ccdetect: fix 608 detection

When cc_type is 00 or 01 the CC is 608 data, the last bit only
denotes the field

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/474>
This commit is contained in:
Mathieu Duponchelle 2021-02-12 02:10:39 +01:00 committed by GStreamer Merge Bot
parent cc402f769c
commit a7df50e68f

View file

@ -108,18 +108,11 @@ impl CCDetect {
cc_type cc_type
); );
if !started_ccp && cc_valid { if !started_ccp && cc_valid && (cc_type == 0x00 || cc_type == 0x01) {
if cc_type == 0x00 {
if triple[1] != 0x80 || triple[2] != 0x80 { if triple[1] != 0x80 || triple[2] != 0x80 {
have_cc608 = true; have_cc608 = true;
} }
continue; continue;
} else if cc_type == 0x01 {
if triple[1] != 0x80 || triple[2] != 0x80 {
have_cc708 = true;
}
continue;
}
} }
if cc_type & 0b10 == 0b10 { if cc_type & 0b10 == 0b10 {