Commit 20e7684c by olly Committed by Oliver Woodman

FlacExtractor: Fix possible skipping of frame boundaries

PiperOrigin-RevId: 288304477
parent be3257e8
......@@ -272,7 +272,7 @@ public final class FlacExtractor implements Extractor {
// Skip frame search on the bytes within the minimum frame size.
if (currentFrameBytesWritten < minFrameSize) {
buffer.skipBytes(Math.min(minFrameSize, buffer.bytesLeft()));
buffer.skipBytes(Math.min(minFrameSize - currentFrameBytesWritten, buffer.bytesLeft()));
}
long nextFrameFirstSampleNumber = findFrame(buffer, foundEndOfInput);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment