diff options
author | Matthew Waters <matthew@centricular.com> | 2020-03-12 14:06:49 +1100 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-05-11 12:30:31 +0000 |
commit | 31a0bf367d2ab9891d98a52ed872df5e05fffe7a (patch) | |
tree | cb93156b35eee69f4b3404f1ea11a7fa46aa0a98 /tests | |
parent | b25d75f20122adc7efe5266e91cd6b66812558a1 (diff) | |
download | gstreamer-plugins-bad-31a0bf367d2ab9891d98a52ed872df5e05fffe7a.tar.gz |
ccconverter: cc_count limits are per framerate
Enforce this and add a test for cdp input being too large.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/ccconverter.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/check/elements/ccconverter.c b/tests/check/elements/ccconverter.c index 3eb9c69e4..85b9c6005 100644 --- a/tests/check/elements/ccconverter.c +++ b/tests/check/elements/ccconverter.c @@ -338,6 +338,25 @@ GST_START_TEST (convert_cea708_cdp_cea708_cc_data) GST_END_TEST; +GST_START_TEST (convert_cea708_cdp_cea708_cc_data_too_big) +{ + const guint8 in[] = + { 0x96, 0x69, 0x2e, 0x8f, 0x43, 0x00, 0x00, 0x72, 0xeb, 0xfc, 0x80, 0x80, + 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, + 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, + 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0x74, 0x00, 0x00, 0x8a, + }; + const guint8 out[] = { 0xfc, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, + 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, + 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x80 + }; + check_conversion (in, sizeof (in), out, sizeof (out), + "closedcaption/x-cea-708,format=(string)cdp", + "closedcaption/x-cea-708,format=(string)cc_data"); +} + +GST_END_TEST; + static Suite * ccextractor_suite (void) { @@ -361,6 +380,7 @@ ccextractor_suite (void) tcase_add_test (tc, convert_cea708_cdp_cea608_raw); tcase_add_test (tc, convert_cea708_cdp_cea608_s334_1a); tcase_add_test (tc, convert_cea708_cdp_cea708_cc_data); + tcase_add_test (tc, convert_cea708_cdp_cea708_cc_data_too_big); return s; } |