mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00

Caption characters weren't being assigned to the correct window and the lack of pen location support was causing multiple lines (and words) to be concatenated. As per the CEA-708-B specification, section 8.10.5, when we encounter a DefineWindow command, we're also supposed to update the current window to the newly defined one. We were not doing this previously, resulting in text that should have been in separate windows being combined into one. Furthermore, some content uses the SetPenLocation command to move the cursor down a line instead of appending a new line. As we don't currently support SetPenLocation, this resulted in multiple lines (and words) being concatenated together, potentially causing the text to extend past the edge of the window/screen. This change implements a workaround (until SetPenLocation is properly supported) for this issue in which setting the pen location to a new row will append a new-line to that window. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149679613