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

When CEA-608 is embedded in MP4 each packet consists of cc_data_1 and cc_data_2 only. The marker_bits, cc_valid and cc_type are implicit. As a result playback of CEA-608 embedded in MP4 broke when we started passing the extra byte for the TS case (and adjusted the decoder to assume the byte was present). This change introduces a special mimeType for the case where the byte is implicit (!). An alternative option was to insert the extra byte every 2 bytes in the MP4 extractor, but this is really quite fiddly to get right. Also made the loops in the 608/708 decoders robust against input of the wrong length. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140609304