Skip to content

Commit 0499bc4

Browse files
aveladjoeyparrish
authored andcommitted
fix(HLS): Ignore errors when try to detect CC (#7668)
1 parent 576daba commit 0499bc4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/media/segment_utils.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,13 @@ shaka.media.SegmentUtils = class {
381381
if (initData) {
382382
captionParser.init(initData);
383383
}
384-
captionParser.parseFrom(data);
385-
for (const stream of captionParser.getStreams()) {
386-
closedCaptions.set(stream, stream);
384+
try {
385+
captionParser.parseFrom(data);
386+
for (const stream of captionParser.getStreams()) {
387+
closedCaptions.set(stream, stream);
388+
}
389+
} catch (e) {
390+
shaka.log.debug('Error detecting CC streams', e);
387391
}
388392
captionParser.reset();
389393
}

0 commit comments

Comments
 (0)