summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2020-07-01 19:41:33 +1000
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-07-01 19:33:56 +0000
commit4f334234c82cc8924eab4b8bdd7fc7593c97dc85 (patch)
tree22f22522eeab5417207269e75339bca240703994 /tests
parent1e29c5d52ae0eb71222ddc85529d8beb696855e9 (diff)
ccconverter: fix missing output framerate on the caps
A pipeline like this: closedcaption/x-cea-708,format=cdp,framerate=30000/1001 ! ccconverter ! closedcaption/x-cea-708,format=cc_data would produce a critical/assert: GStreamer-CRITICAL **: 14:21:11.509: gst_util_fraction_multiply: assertion 'a_d != 0' failed because there would be no framerate field on ccconverter's output. Fixed by always fixating a framerate if the input has a framerate. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1393>
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/ccconverter.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/check/elements/ccconverter.c b/tests/check/elements/ccconverter.c
index 82a5ff6a2..e44466d64 100644
--- a/tests/check/elements/ccconverter.c
+++ b/tests/check/elements/ccconverter.c
@@ -142,9 +142,20 @@ GST_START_TEST (framerate_passthrough)
gst_harness_set_sink_caps_str (h,
"closedcaption/x-cea-708,format=(string)cc_data,framerate=(fraction)30/1");
- fail_unless_equals_int (gst_harness_push (h, buffer),
+ fail_unless_equals_int (gst_harness_push (h, gst_buffer_ref (buffer)),
GST_FLOW_NOT_NEGOTIATED);
+ /* Now try cdp -> cc_data with framerate passthrough */
+ gst_harness_set_src_caps_str (h,
+ "closedcaption/x-cea-708,format=(string)cdp,framerate=(fraction)30/1");
+
+ gst_harness_set_sink_caps_str (h,
+ "closedcaption/x-cea-708,format=(string)cc_data");
+
+ fail_unless_equals_int (gst_harness_push (h, gst_buffer_ref (buffer)),
+ GST_FLOW_OK);
+
+ gst_buffer_unref (buffer);
gst_harness_teardown (h);
}