summaryrefslogtreecommitdiff
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-02-01 14:20:25 (GMT)
committer Thiago Santos <thiago.sousa.santos@collabora.co.uk>2011-02-03 22:09:20 (GMT)
commitbb0cdda4870d46e525adcfa91abc95e62a85d2f4 (patch) (side-by-side diff)
treefd1b4d80a5e7f197d110516fa17ee0cf5e4e1273
parent48b05a3002f48faffdaabfbf3997b2bdda273aaf (diff)
downloadgst-plugins-bad-bb0cdda4870d46e525adcfa91abc95e62a85d2f4.zip
gst-plugins-bad-bb0cdda4870d46e525adcfa91abc95e62a85d2f4.tar.gz
tests: camerabin2: Improve preview checking
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--tests/check/elements/camerabin2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/check/elements/camerabin2.c b/tests/check/elements/camerabin2.c
index df630d4..53e6ccc 100644
--- a/tests/check/elements/camerabin2.c
+++ b/tests/check/elements/camerabin2.c
@@ -287,6 +287,7 @@ check_preview_image (void)
{
fail_unless (preview_buffer != NULL);
if (preview_caps) {
+ fail_unless (GST_BUFFER_CAPS (preview_buffer) != NULL);
fail_unless (gst_caps_can_intersect (GST_BUFFER_CAPS (preview_buffer),
preview_caps));
}
@@ -786,6 +787,11 @@ GST_START_TEST (test_image_capture_previews)
g_main_loop_run (main_loop);
check_preview_image ();
+
+ if (preview_buffer)
+ gst_buffer_unref (preview_buffer);
+ preview_buffer = NULL;
+ gst_caps_replace (&preview_caps, NULL);
}
gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL);