MP3 CBR fallback: Remove null check and add a comment

PiperOrigin-RevId: 735708126
This commit is contained in:
ibaker 2025-03-11 04:33:18 -07:00 committed by Copybara-Service
parent 44b3a43652
commit ecac78f630

View File

@ -503,15 +503,14 @@ public final class Mp3Extractor implements Extractor {
if (resultSeeker == null
|| (!resultSeeker.isSeekable() && (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING) != 0)) {
// Either we found no seek or VBR info, so we must assume the file is CBR (even without the
// flag(s) being set), or an 'enable CBR seeking flag' is set and we found some seek info,
// but not enough to seek with. In either case, we fall back to CBR seeking.
resultSeeker =
getConstantBitrateSeeker(
input, (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING_ALWAYS) != 0);
}
if (resultSeeker != null) {
realTrackOutput.durationUs(resultSeeker.getDurationUs());
}
return resultSeeker;
}