mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
MP3 CBR fallback: Remove null check and add a comment
PiperOrigin-RevId: 735708126
This commit is contained in:
parent
44b3a43652
commit
ecac78f630
@ -503,15 +503,14 @@ public final class Mp3Extractor implements Extractor {
|
|||||||
|
|
||||||
if (resultSeeker == null
|
if (resultSeeker == null
|
||||||
|| (!resultSeeker.isSeekable() && (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING) != 0)) {
|
|| (!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 =
|
resultSeeker =
|
||||||
getConstantBitrateSeeker(
|
getConstantBitrateSeeker(
|
||||||
input, (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING_ALWAYS) != 0);
|
input, (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING_ALWAYS) != 0);
|
||||||
}
|
}
|
||||||
|
realTrackOutput.durationUs(resultSeeker.getDurationUs());
|
||||||
if (resultSeeker != null) {
|
|
||||||
realTrackOutput.durationUs(resultSeeker.getDurationUs());
|
|
||||||
}
|
|
||||||
|
|
||||||
return resultSeeker;
|
return resultSeeker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user