File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
libraries/extractor/src/main/java/androidx/media3/extractor/mp3 Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -503,15 +503,14 @@ private Seeker computeSeeker(ExtractorInput input) throws IOException {
503503
504504 if (resultSeeker == null
505505 || (!resultSeeker .isSeekable () && (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING ) != 0 )) {
506+ // Either we found no seek or VBR info, so we must assume the file is CBR (even without the
507+ // flag(s) being set), or an 'enable CBR seeking flag' is set and we found some seek info,
508+ // but not enough to seek with. In either case, we fall back to CBR seeking.
506509 resultSeeker =
507510 getConstantBitrateSeeker (
508511 input , (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING_ALWAYS ) != 0 );
509512 }
510-
511- if (resultSeeker != null ) {
512- realTrackOutput .durationUs (resultSeeker .getDurationUs ());
513- }
514-
513+ realTrackOutput .durationUs (resultSeeker .getDurationUs ());
515514 return resultSeeker ;
516515 }
517516
You can’t perform that action at this time.
0 commit comments