mirror of
https://github.com/samsonjs/media.git
synced 2026-04-11 12:15:47 +00:00
Fixed potential bug in which old paint-on captions could be drawn overtop by pop-on captions as they weren't being cleared properly.
This fix was taken from YouTube's Cea608Decoder ([] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147066662
This commit is contained in:
parent
9e07cf7c73
commit
ef475eb9c9
1 changed files with 5 additions and 2 deletions
|
|
@ -503,11 +503,14 @@ public final class Cea608Decoder extends CeaDecoder {
|
|||
return;
|
||||
}
|
||||
|
||||
int oldCaptionMode = this.captionMode;
|
||||
this.captionMode = captionMode;
|
||||
|
||||
// Clear the working memory.
|
||||
resetCueBuilders();
|
||||
if (captionMode == CC_MODE_ROLL_UP || captionMode == CC_MODE_UNKNOWN) {
|
||||
// When switching to roll-up or unknown, we also need to clear the caption.
|
||||
if (oldCaptionMode == CC_MODE_PAINT_ON || captionMode == CC_MODE_ROLL_UP
|
||||
|| captionMode == CC_MODE_UNKNOWN) {
|
||||
// When switching from paint-on or to roll-up or unknown, we also need to clear the caption.
|
||||
cues = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue