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

The MIME type is currently required to select a SubtitleDecoder implementation in the TextRenderer. Future changes might remove this requirement, so we pre-emptively mark the field as @Nullable. The change in SingleSampleMediaSource ensures the track still maps to the TextRenderer, otherwise it shows up as unmapped. Passing null MIME type to MediaItem.Subtitle constructor now results in this from EventLogger: TextRenderer [ Group:0, adaptive_supported=N/A [ [ ] Track:0, id=null, mimeType=text/x-unknown, language=en, supported=NO_UNSUPPORTED_TYPE ] ] PiperOrigin-RevId: 398010809