mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-03 10:13:47 +00:00
cea608tocea708: Fix SMPTE 334-1a field flag usage
If the flag is set then this is field 0, otherwise it is field 1. The
code had this inverted. See also cece286fe8
.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2074>
This commit is contained in:
parent
03b7e8ccdd
commit
5256f1e00c
1 changed files with 3 additions and 3 deletions
|
@ -530,7 +530,7 @@ impl Cea608ToCea708 {
|
|||
return Ok(gst::FlowSuccess::Ok);
|
||||
}
|
||||
for triple in data.chunks_exact(3) {
|
||||
let field = (triple[0] & 0x80) >> 7;
|
||||
let field = if (triple[0] & 0x80) > 0 { 0 } else { 1 };
|
||||
state.handle_cc_data(self, field, [triple[1], triple[2]]);
|
||||
}
|
||||
data.to_vec()
|
||||
|
@ -561,9 +561,9 @@ impl Cea608ToCea708 {
|
|||
for pair in data.chunks_exact(2) {
|
||||
state.handle_cc_data(self, field, [pair[0], pair[1]]);
|
||||
if field == 0 {
|
||||
s334_1a_data.push(0x00);
|
||||
} else {
|
||||
s334_1a_data.push(0x80);
|
||||
} else {
|
||||
s334_1a_data.push(0x00);
|
||||
}
|
||||
s334_1a_data.push(pair[0]);
|
||||
s334_1a_data.push(pair[1]);
|
||||
|
|
Loading…
Reference in a new issue