diff --git a/lib/media/segment_utils.js b/lib/media/segment_utils.js index b2dd393f23..3cdb4319ed 100644 --- a/lib/media/segment_utils.js +++ b/lib/media/segment_utils.js @@ -417,9 +417,13 @@ shaka.media.SegmentUtils = class { if (initData) { captionParser.init(initData); } - captionParser.parseFrom(data); - for (const stream of captionParser.getStreams()) { - closedCaptions.set(stream, stream); + try { + captionParser.parseFrom(data); + for (const stream of captionParser.getStreams()) { + closedCaptions.set(stream, stream); + } + } catch (e) { + shaka.log.debug('Error detecting CC streams', e); } captionParser.reset(); }