cccombiner: fix CDP padding detection
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 27 Jul 2021 21:53:06 +0000 (23:53 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 28 Jul 2021 11:53:12 +0000 (11:53 +0000)
While a cc_data_pkt with cc_valid 0 should be considered padding,
it might be followed up by valid DTVCC packets, and should not
cause the whole CDP packet to get discarded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2440>

ext/closedcaption/gstcccombiner.c

index aef5e6c..d0bb23c 100644 (file)
@@ -450,7 +450,7 @@ schedule_cdp (GstCCCombiner * self, const GstVideoTimeCode * tc,
       guint8 cc_type = cc_data[i * 3] & 0x03;
 
       if (!cc_valid)
-        break;
+        continue;
 
       if (cc_type == 0x00 || cc_type == 0x01) {
         if (cc_data[i * 3 + 1] != 0x80 || cc_data[i * 3 + 2] != 0x80) {