camerabin: Fix caps leaks
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Mon, 20 Dec 2010 14:06:52 +0000 (11:06 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Mon, 20 Dec 2010 14:06:52 +0000 (11:06 -0300)
Fix some caps leaks on unit tests

tests/check/elements/camerabin.c

index f5dbfdc..0df4f9b 100644 (file)
@@ -579,6 +579,7 @@ GST_START_TEST (test_video_recording)
 
   /* Set preview-caps */
   g_object_set (camera, "preview-caps", preview_caps, NULL);
+  gst_caps_unref (preview_caps);
 
   /* check that the camera is idle */
   g_object_get (camera, "idle", &idle, NULL);
@@ -626,6 +627,7 @@ GST_START_TEST (test_video_recording_with_flags)
 
   /* Set preview-caps */
   g_object_set (camera, "preview-caps", preview_caps, NULL);
+  gst_caps_unref (preview_caps);
 
   GST_INFO ("starting capture");
   g_signal_emit_by_name (camera, "capture-start", NULL);
@@ -712,6 +714,7 @@ GST_START_TEST (test_video_recording_no_audio)
 
   /* Set preview-caps */
   g_object_set (camera, "preview-caps", preview_caps, NULL);
+  gst_caps_unref (preview_caps);
 
   GST_INFO ("starting capture");
   g_signal_emit_by_name (camera, "capture-start", NULL);