summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2019-08-07 13:01:07 +0300
committerTim-Philipp Müller <tim@centricular.com>2019-08-11 10:44:27 +0100
commit936fabc52d832de39412bcf4a09f7207818dca33 (patch)
tree1c35285dee59f43e7e5a20d9cef9264b28445786
parent467656df0df9e6ade3808b90a4a4f9c549c14338 (diff)
downloadgstreamer-plugins-base-936fabc52d832de39412bcf4a09f7207818dca33.tar.gz
video-anc: Fix ADF detection when trying to extract data from vanc
Previously we were checking offset 1 twice, but the second check should've been for offset 2.
-rw-r--r--gst-libs/gst/video/video-anc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/video/video-anc.c b/gst-libs/gst/video/video-anc.c
index 0374e2790..32706874d 100644
--- a/gst-libs/gst/video/video-anc.c
+++ b/gst-libs/gst/video/video-anc.c
@@ -126,7 +126,7 @@ get_ancillary_16 (GstVideoVBIParser * parser, GstVideoAncillary * anc)
composite = TRUE;
} else if (data[parser->offset] == 0x000 &&
data[parser->offset + 1] == 0x3ff &&
- data[parser->offset + 1] == 0x3ff) {
+ data[parser->offset + 2] == 0x3ff) {
/* component */
i += 3;
composite = FALSE;
@@ -234,7 +234,7 @@ get_ancillary_8 (GstVideoVBIParser * parser, GstVideoAncillary * anc)
composite = TRUE;
i += 1;
} else if (data[parser->offset] == 0x00 &&
- data[parser->offset + 1] == 0xff && data[parser->offset + 1] == 0xff) {
+ data[parser->offset + 1] == 0xff && data[parser->offset + 2] == 0xff) {
/* component */
composite = FALSE;
i += 3;