From c41b5d016cbbe8dc6fa99a377b169e96d24238a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Thu, 24 Nov 2011 21:52:55 +0100 Subject: [PATCH] tests: fix caps usage in parser test helper Fixes previous commit; users can call this with NULL caps. --- tests/check/elements/parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/check/elements/parser.c b/tests/check/elements/parser.c index 749492c849..70b05b0358 100644 --- a/tests/check/elements/parser.c +++ b/tests/check/elements/parser.c @@ -151,8 +151,10 @@ setup_element (const gchar * factory, ElementSetup setup, sinkpad = gst_check_setup_sink_pad (element, sink_template); gst_pad_set_active (srcpad, TRUE); gst_pad_set_active (sinkpad, TRUE); - fail_unless (gst_pad_set_caps (srcpad, src_caps)); - fail_unless (gst_pad_set_caps (sinkpad, sink_caps)); + if (src_caps) + fail_unless (gst_pad_set_caps (srcpad, src_caps)); + if (sink_caps) + fail_unless (gst_pad_set_caps (sinkpad, sink_caps)); bus = gst_bus_new (); gst_element_set_bus (element, bus);