Skip to content

Commit

Permalink
fix: Fix handling of CC when switching between codecs (#5160)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored and joeyparrish committed Apr 26, 2023
1 parent 4d694b2 commit 88a7710
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,8 @@ shaka.media.MediaSourceEngine = class {
data = transmuxedData.data;
} else if (hasClosedCaptions) {
if (!this.textEngine_) {
this.reinitText('text/vtt', this.sequenceMode_);
this.reinitText(shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE,
this.sequenceMode_);
}
// If it is the init segment for closed captions, initialize the closed
// caption parser.
Expand Down
1 change: 1 addition & 0 deletions lib/text/text_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ shaka.text.TextEngine = class {
// into TextEngine and TextDisplayer.
if (mimeType == shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE ||
mimeType == shaka.util.MimeUtils.CEA708_CLOSED_CAPTION_MIMETYPE) {
this.parser_ = null;
return;
}

Expand Down

0 comments on commit 88a7710

Please sign in to comment.