Skip to content

Commit

Permalink
fix: 608 caption out of bound rows (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
wseymour15 committed Mar 11, 2024
1 parent 2d61f49 commit 37ec801
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/m2ts/caption-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,9 @@ var Cea608Stream = function(field, dataChannel) {
this.setRollUp(packet.pts, row);
}

if (row !== this.row_) {
// Ensure the row is between 0 and 14, otherwise use the most
// recent or default row.
if (row !== this.row_ && row >= 0 && row <= 14) {
// formatting is only persistent for current row
this.clearFormatting(packet.pts);
this.row_ = row;
Expand Down

0 comments on commit 37ec801

Please sign in to comment.