mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
FlacExtractor: Fix possible skipping of frame boundaries
PiperOrigin-RevId: 288304477
This commit is contained in:
parent
be3257e87a
commit
20e7684c6c
1 changed files with 1 additions and 1 deletions
|
|
@ -272,7 +272,7 @@ public final class FlacExtractor implements Extractor {
|
||||||
|
|
||||||
// Skip frame search on the bytes within the minimum frame size.
|
// Skip frame search on the bytes within the minimum frame size.
|
||||||
if (currentFrameBytesWritten < minFrameSize) {
|
if (currentFrameBytesWritten < minFrameSize) {
|
||||||
buffer.skipBytes(Math.min(minFrameSize, buffer.bytesLeft()));
|
buffer.skipBytes(Math.min(minFrameSize - currentFrameBytesWritten, buffer.bytesLeft()));
|
||||||
}
|
}
|
||||||
|
|
||||||
long nextFrameFirstSampleNumber = findFrame(buffer, foundEndOfInput);
|
long nextFrameFirstSampleNumber = findFrame(buffer, foundEndOfInput);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue