forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cea): Fix BUFFER_READ_OUT_OF_BOUNDS error when CEA caption packet…
…s are empty (shaka-project#3609) Added check for empty caption packets in closed_caption_parser. Added a unit test that verifies the closed_caption_parser now works with a video segment that contains empty caption packets. Fixes shaka-project#3608
- Loading branch information
Showing
4 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
goog.require('shaka.media.ClosedCaptionParser'); | ||
goog.require('shaka.test.Util'); | ||
|
||
describe('ClosedCaptionParser', () => { | ||
it('can handle empty caption packets', async () => { | ||
const initSegment = await shaka.test.Util.fetch( | ||
'base/test/test/assets/empty_caption_video_init.mp4'); | ||
const videoSegment = await shaka.test.Util.fetch( | ||
'base/test/test/assets/empty_caption_video_segment.mp4'); | ||
const parser = new shaka.media.ClosedCaptionParser(); | ||
parser.init(initSegment); | ||
parser.parseFrom(videoSegment); | ||
}); | ||
}); | ||
|
Binary file not shown.
Binary file not shown.