mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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
This commit is contained in:
parent
cfda4a5870
commit
792d9b39e0
1 changed files with 1 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ public final class FlacExtractor implements Extractor {
|
||||||
SeekMap seekMap;
|
SeekMap seekMap;
|
||||||
if (haveSeekTable) {
|
if (haveSeekTable) {
|
||||||
seekMap = new FlacSeekMap(streamMetadata.getDurationUs(), decoderJni);
|
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();
|
long firstFramePosition = decoderJni.getDecodePosition();
|
||||||
binarySearchSeeker =
|
binarySearchSeeker =
|
||||||
new FlacBinarySearchSeeker(
|
new FlacBinarySearchSeeker(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue