Commit 792d9b39 by kimvde Committed by kim-vde

Flac extension: disable BinarySearchSeeker if totalSamples is unknown

The ceilingTimePosition is based on the total number of samples. Binary
search seeking is not possible if this value is unknown.

PiperOrigin-RevId: 292921177
parent cfda4a58
......@@ -250,7 +250,7 @@ public final class FlacExtractor implements Extractor {
SeekMap seekMap;
if (haveSeekTable) {
seekMap = new FlacSeekMap(streamMetadata.getDurationUs(), decoderJni);
} else if (streamLength != C.LENGTH_UNSET) {
} else if (streamLength != C.LENGTH_UNSET && streamMetadata.totalSamples > 0) {
long firstFramePosition = decoderJni.getDecodePosition();
binarySearchSeeker =
new FlacBinarySearchSeeker(
......
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