Enable CBR seeking for files with unknown length in AmrExtractor

Constant bit rate (CBR) seeking can be enabled even when the length of the file is not known.

Additionally, dump files for these files have been updated to accurately log the `position` when `timeUs` is set to `0`.

PiperOrigin-RevId: 662868607
This commit is contained in:
rohks 2024-08-14 04:29:01 -07:00 committed by Copybara-Service
parent ca455ee858
commit e9cfd72083
3 changed files with 2 additions and 3 deletions

View File

@ -381,7 +381,6 @@ public final class AmrExtractor implements Extractor {
}
if ((flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING) == 0
|| inputLength == C.LENGTH_UNSET
|| (firstSampleSize != C.LENGTH_UNSET && firstSampleSize != currentSampleSize)) {
seekMap = new SeekMap.Unseekable(C.TIME_UNSET);
extractorOutput.seekMap(seekMap);

View File

@ -1,7 +1,7 @@
seekMap:
isSeekable = false
duration = UNSET TIME
getPosition(0) = [[timeUs=0, position=0]]
getPosition(0) = [[timeUs=0, position=6]]
numberOfTracks = 1
track 0:
total output bytes = 2834

View File

@ -1,7 +1,7 @@
seekMap:
isSeekable = false
duration = UNSET TIME
getPosition(0) = [[timeUs=0, position=0]]
getPosition(0) = [[timeUs=0, position=9]]
numberOfTracks = 1
track 0:
total output bytes = 4056