mirror of
https://github.com/androidx/media.git
synced 2025-05-16 12:09:50 +08:00

If the length of the `ExtractorInput` is not known then the `subtitleData` field is re-sized by 1kB each time (`SubtitleExtractor.DEFAULT_BUFFER_SIZE`), so the end of the array is often not populated. This change ensures that `length` is propagated to `SubtitleParser`, so that implementations don't try and parse the garbage/zero bytes at the end of the array. Discovered while investigating Issue: androidx/media#1516 #cherrypick PiperOrigin-RevId: 661195634 (cherry picked from commit f37f9690f489dbe83366c93c452faf70b272cae3)