Skip to content

Commit

Permalink
fix: 608 caption out of bound rows
Browse files Browse the repository at this point in the history
  • Loading branch information
wseymour15 committed Mar 11, 2024
1 parent 0b0e5a9 commit e9debc7
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 e9debc7

Please sign in to comment.