8000 fix: 608 caption out of bound rows (#442) · videojs/mux.js@37ec801 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 37ec801

Browse files
authored
fix: 608 caption out of bound rows (#442)
1 parent 2d61f49 commit 37ec801

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/m2ts/caption-stream.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,9 @@ var Cea608Stream = function(field, dataChannel) {
14331433
this.setRollUp(packet.pts, row);
14341434
}
14351435

1436-
if (row !== this.row_) {
1436+
// Ensure the row is between 0 and 14, otherwise use the most
1437+
// recent or default row.
1438+
if (row !== this.row_ && row >= 0 && row <= 14) {
14371439
// formatting is only persistent for current row
14381440
this.clearFormatting(packet.pts);
14391441
this.row_ = row;

0 commit comments

Comments
 (0)
0