Skip to content

Commit

Permalink
fix(cea): make a more robust CEA MP4 parser (#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Velad Galván committed Feb 24, 2022
1 parent c438e85 commit 2687b95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/cea/mp4_cea_parser.js
Expand Up @@ -236,7 +236,13 @@ shaka.cea.Mp4CeaParser = class {
});
}
} else {
reader.skip(naluSize - 1);
try {
reader.skip(naluSize - 1);
} catch (e) {
// It is necessary to ignore this error because it can break the start
// of playback even if the user does not want to see the subtitles.
break;
}
}
sampleSize -= (naluSize + 4);
if (sampleSize == 0) {
Expand Down

0 comments on commit 2687b95

Please sign in to comment.