tests: use gst-check API in videotestsrc
authorThijs Vermeir <thijsvermeir@gmail.com>
Thu, 16 Sep 2010 13:07:15 +0000 (15:07 +0200)
committerThijs Vermeir <thijsvermeir@gmail.com>
Thu, 16 Sep 2010 13:07:15 +0000 (15:07 +0200)
use gst_check_drop_buffers in videotestsrc to
clear the global buffers list.

tests/check/elements/videotestsrc.c

index 5a743ba..635ca32 100644 (file)
@@ -70,9 +70,7 @@ cleanup_videotestsrc (GstElement * videotestsrc)
 {
   GST_DEBUG ("cleanup_videotestsrc");
 
-  g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
-  g_list_free (buffers);
-  buffers = NULL;
+  gst_check_drop_buffers ();
 
   gst_pad_set_active (mysinkpad, FALSE);
   gst_check_teardown_sink_pad (videotestsrc);
@@ -111,9 +109,7 @@ GST_START_TEST (test_all_patterns)
 
     gst_element_set_state (videotestsrc, GST_STATE_READY);
 
-    g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
-    g_list_free (buffers);
-    buffers = NULL;
+    gst_check_drop_buffers ();
     ++j;
   }