FlacExtractor: Fix possible skipping of frame boundaries
PiperOrigin-RevId: 288304477
This commit is contained in:
parent
24743c77ce
commit
9618e5e00f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user