Commit 6ae9c23f authored by Guillaume Desmottes's avatar Guillaume Desmottes 🐐 Committed by Sebastian Dröge

fix buffer leaks in tests

Need to call gst_check_drop_buffers() to release the buffers exchanged
during the test.

https://bugzilla.gnome.org/show_bug.cgi?id=766561
parent fb41b307
......@@ -61,6 +61,7 @@ cleanup_capssetter (GstElement * capssetter)
{
GST_DEBUG ("cleanup_capssetter");
gst_check_drop_buffers ();
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_src_pad (capssetter);
......
......@@ -148,6 +148,7 @@ cleanup_icydemux (void)
gst_object_unref (bus);
bus = NULL;
gst_check_drop_buffers ();
gst_check_teardown_src_pad (icydemux);
if (sinkpad)
gst_check_teardown_sink_pad (icydemux);
......
......@@ -81,6 +81,7 @@ cleanup_jpegenc (GstElement * jpegenc)
GST_DEBUG ("cleanup_jpegenc");
gst_element_set_state (jpegenc, GST_STATE_NULL);
gst_check_drop_buffers ();
gst_pad_set_active (mysrcpad, FALSE);
gst_pad_set_active (mysinkpad, FALSE);
gst_check_teardown_sink_pad (jpegenc);
......
......@@ -241,6 +241,7 @@ GST_START_TEST (test_message_is_valid)
gst_object_unref (bus);
gst_element_set_state (level, GST_STATE_NULL);
cleanup_level (level);
gst_check_drop_buffers ();
}
GST_END_TEST;
......
......@@ -371,6 +371,7 @@ GST_START_TEST (test_multifilesrc_stop_index)
gst_element_set_state (src, GST_STATE_NULL);
gst_check_drop_buffers ();
gst_check_teardown_pad_by_name (src, "src");
gst_check_teardown_element (src);
}
......
......@@ -577,6 +577,7 @@ GST_START_TEST (test_reuse)
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
cleanup_qtmux (qtmux, "video_%u");
gst_check_drop_buffers ();
}
GST_END_TEST;
......@@ -879,6 +880,7 @@ test_average_bitrate_custom (const gchar * elementname,
gst_element_set_state (qtmux, GST_STATE_NULL);
gst_element_set_state (filesink, GST_STATE_NULL);
gst_check_drop_buffers ();
gst_pad_set_active (mysrcpad, FALSE);
teardown_src_pad (mysrcpad);
gst_object_unref (filesink);
......
......@@ -138,6 +138,7 @@ cleanup_rtprtx (GstElement * rtprtxsend, GstElement * rtprtxreceive)
g_list_free (inbuffers);
inbuffers = NULL;
gst_check_drop_buffers ();
gst_pad_set_active (srcpad, FALSE);
gst_check_teardown_src_pad (rtprtxsend);
gst_check_teardown_element (rtprtxsend);
......
......@@ -125,6 +125,7 @@ no_socket:
gst_element_set_state (udpsrc, GST_STATE_NULL);
gst_check_drop_buffers ();
gst_check_teardown_pad_by_name (udpsrc, "src");
gst_check_teardown_element (udpsrc);
......@@ -222,6 +223,7 @@ send_failure:
gst_element_set_state (udpsrc, GST_STATE_NULL);
gst_check_drop_buffers ();
gst_check_teardown_pad_by_name (udpsrc, "src");
gst_check_teardown_element (udpsrc);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment