Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2021-02-12 04:10:39 +0300
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-02-15 22:25:18 +0300
commita7df50e68fab31a52ab31361e75f2d00c11955af (patch)
tree8b4198bcd75e3c0a0673f58d7da5edf7ce125f0a /video/closedcaption/src/ccdetect/imp.rs
parentcc402f769cf45f8ac46706452cd367b24342e6df (diff)
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>
Diffstat (limited to 'video/closedcaption/src/ccdetect/imp.rs')
-rw-r--r--video/closedcaption/src/ccdetect/imp.rs15
1 files changed, 4 insertions, 11 deletions
diff --git a/video/closedcaption/src/ccdetect/imp.rs b/video/closedcaption/src/ccdetect/imp.rs
index c19b537c1..597dbf35f 100644
--- a/video/closedcaption/src/ccdetect/imp.rs
+++ b/video/closedcaption/src/ccdetect/imp.rs
@@ -108,18 +108,11 @@ impl CCDetect {
cc_type
);
- if !started_ccp && cc_valid {
- if cc_type == 0x00 {
- if triple[1] != 0x80 || triple[2] != 0x80 {
- have_cc608 = true;
- }
- continue;
- } else if cc_type == 0x01 {
- if triple[1] != 0x80 || triple[2] != 0x80 {
- have_cc708 = true;
- }
- continue;
+ if !started_ccp && cc_valid && (cc_type == 0x00 || cc_type == 0x01) {
+ if triple[1] != 0x80 || triple[2] != 0x80 {
+ have_cc608 = true;
}
+ continue;
}
if cc_type & 0b10 == 0b10 {