-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Issue description
Summary
CEA-608 caption goes out of safe area (bleeds out of screen) in Roll-up mode
Root Cause
On certain Live TV channels the Caption from Live TV program bleeds out of the entire screen. This happens in Roll-Up mode and when the caption start at the left top with row number less than or equals to 2.
The Cea608Decoder.java line number 890
ExoPlayer/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java
Line 890 in 6bfdf8f
| if (captionMode == CC_MODE_ROLL_UP || row > (BASE_ROW / 2)) { |
has this logic -
if (captionMode == CC_MODE_ROLL_UP || row > (BASE_ROW / 2)) {
lineAnchor = Cue.ANCHOR_TYPE_END;
line = row - BASE_ROW;
// Two line adjustments. The first is because line indices from the bottom of the window
// start from -1 rather than 0. The second is a blank row to act as the safe area.
line -= 2;
} else {
lineAnchor = Cue.ANCHOR_TYPE_START;
// Line indices from the top of the window start from 0, but we want a blank row to act as
// the safe area. As a result no adjustment is necessary.
line = row;
}
Roll-up caption with row number on top portion of the screen are also pulled up by two lines because of this code. When the row number is less than 2, the Roll-up caption is drawn on the top of the screen. I think this violates the safe area restriction. The effect of this is the caption from the first row is cut off.
Changing the if condition at line 890 to -
if (row > (BASE_ROW / 2)
i.e. excluding Roll-up caption mode check, fixes the caption bleeding issue. Line 890 seem to be modified as part of commit (e86bfd6).
Could you please explain why the Roll-up captions are always pulled up by 2 lines? What could be the side effect of not checking for Roll-up mode at line number 890?
Reproduction steps
Using the sample HLS stream, play to the stream. Observe the caption when it’s on top left screen.
Link to test content
Content is broadcast from cable, so link was sent to exoplayer dev email
A full bug report captured from the device
N/A
Version of ExoPlayer being used
2.11.4
Device(s) and version(s) of Android being used
Tested and reproduced on Arris and Amino AndroidTV devices running Android Pie. Reproduction is 100%.