Skip to content

Commit

Permalink
writer: don't store padding cea-608 data for writing
Browse files Browse the repository at this point in the history
It will be generated as necessary on output.
  • Loading branch information
ystreet committed Nov 28, 2024
1 parent 7c7193b commit 929a25e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,16 @@ impl CCDataWriter {
/// Push a [`Cea608`] byte pair for writing
pub fn push_cea608(&mut self, cea608: Cea608) {
match cea608 {
Cea608::Field1(byte0, byte1) => self.cea608_1.push((byte0, byte1)),
Cea608::Field2(byte0, byte1) => self.cea608_2.push((byte0, byte1)),
Cea608::Field1(byte0, byte1) => {
if byte0 != 0x80 && byte1 != 0x80 {
self.cea608_1.push((byte0, byte1))
}
}
Cea608::Field2(byte0, byte1) => {
if byte0 != 0x80 && byte1 != 0x80 {
self.cea608_2.push((byte0, byte1))
}
}
}
}

Expand Down

0 comments on commit 929a25e

Please sign in to comment.