use gst_check_drop_buffers in videotestsrc to
clear the global buffers list.
{
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);
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;
}