mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

We deliberately left `Cea608Decoder` and `Cea708Decoder` intact when creating the respective `SubtitleParser` implementations (in27caeb8038
and94e45eb4ad
respectively). However we didn't correctly change the behaviour of `SubtitleDecoderFactory.DEFAULT` in order to use these 'legacy' implementations. We firstly left the `Cea608Decoder` instantiation **after** the `DefaultSubtitleParserFactory.supportsFormat()` check, meaning that code would never be reached (since `supportsFormat` now returns true for CEA-608). Then in the second change (which was supposed to only be about CEA-708) we removed all instantiations of **both** `Cea608Decoder` and `Cea708Decoder`. This change puts the decoder instantiations back and moves them above the `DefaultSubtitleParserFactory.supportsFormat` check, meaning they will be used in preference to `DelegatingSubtitleDecoder`. This resolves the immediately-disappearing subtitles tracked by Issue: androidx/media#904. PiperOrigin-RevId: 592217937