diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-02-07 09:41:51 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-02-07 10:30:28 +0100 |
commit | 02034ce7725e19f411164fcd71315d83655cb13b (patch) | |
tree | fc3f90860d4c329ccb6180b771d003336e8a2464 | |
parent | 9be8a6f48c6a0d5881c730b91e34595934a95378 (diff) | |
download | gstreamer-plugins-good-02034ce7725e19f411164fcd71315d83655cb13b.tar.gz |
tests: fix more tests
-rw-r--r-- | tests/check/elements/videofilter.c | 11 | ||||
-rw-r--r-- | tests/check/elements/y4menc.c | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/check/elements/videofilter.c b/tests/check/elements/videofilter.c index 2dab03cc0..c7c8afcae 100644 --- a/tests/check/elements/videofilter.c +++ b/tests/check/elements/videofilter.c @@ -137,13 +137,16 @@ check_filter (const gchar * name, gint num_buffers, const gchar * prop, ...) 385, 385}}; gint i, n, r; gint size; - GstCaps *templ = gst_caps_from_string (VIDEO_CAPS_TEMPLATE_STRING); + GstCaps *allcaps, *templ = gst_caps_from_string (VIDEO_CAPS_TEMPLATE_STRING); va_list varargs; - n = gst_caps_get_size (templ); + allcaps = gst_caps_normalize (templ); + gst_caps_unref (templ); + + n = gst_caps_get_size (allcaps); for (i = 0; i < n; i++) { - GstStructure *s = gst_caps_get_structure (templ, i); + GstStructure *s = gst_caps_get_structure (allcaps, i); GstCaps *caps = gst_caps_new_empty (); gst_caps_append_structure (caps, gst_structure_copy (s)); @@ -169,7 +172,7 @@ check_filter (const gchar * name, gint num_buffers, const gchar * prop, ...) gst_caps_unref (caps); } - gst_caps_unref (templ); + gst_caps_unref (allcaps); } GST_START_TEST (test_videobalance) diff --git a/tests/check/elements/y4menc.c b/tests/check/elements/y4menc.c index 991b4d268..75935377f 100644 --- a/tests/check/elements/y4menc.c +++ b/tests/check/elements/y4menc.c @@ -99,7 +99,7 @@ GST_START_TEST (test_y4m) /* makes valgrind's memcheck happier */ gst_buffer_memset (inbuffer, 0, 0, size); caps = gst_caps_from_string (VIDEO_CAPS_STRING); - gst_pad_set_caps (mysrcpad, caps); + fail_unless (gst_pad_set_caps (mysrcpad, caps)); gst_caps_unref (caps); GST_BUFFER_TIMESTAMP (inbuffer) = 0; ASSERT_BUFFER_REFCOUNT (inbuffer, "inbuffer", 1); |