mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 08:08:22 +00:00
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
This commit is contained in:
parent
fb41b307a6
commit
6ae9c23fa3
8 changed files with 10 additions and 0 deletions
|
@ -61,6 +61,7 @@ cleanup_capssetter (GstElement * capssetter)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("cleanup_capssetter");
|
GST_DEBUG ("cleanup_capssetter");
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_pad_set_active (mysrcpad, FALSE);
|
gst_pad_set_active (mysrcpad, FALSE);
|
||||||
gst_pad_set_active (mysinkpad, FALSE);
|
gst_pad_set_active (mysinkpad, FALSE);
|
||||||
gst_check_teardown_src_pad (capssetter);
|
gst_check_teardown_src_pad (capssetter);
|
||||||
|
|
|
@ -148,6 +148,7 @@ cleanup_icydemux (void)
|
||||||
gst_object_unref (bus);
|
gst_object_unref (bus);
|
||||||
bus = NULL;
|
bus = NULL;
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_check_teardown_src_pad (icydemux);
|
gst_check_teardown_src_pad (icydemux);
|
||||||
if (sinkpad)
|
if (sinkpad)
|
||||||
gst_check_teardown_sink_pad (icydemux);
|
gst_check_teardown_sink_pad (icydemux);
|
||||||
|
|
|
@ -81,6 +81,7 @@ cleanup_jpegenc (GstElement * jpegenc)
|
||||||
GST_DEBUG ("cleanup_jpegenc");
|
GST_DEBUG ("cleanup_jpegenc");
|
||||||
gst_element_set_state (jpegenc, GST_STATE_NULL);
|
gst_element_set_state (jpegenc, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_pad_set_active (mysrcpad, FALSE);
|
gst_pad_set_active (mysrcpad, FALSE);
|
||||||
gst_pad_set_active (mysinkpad, FALSE);
|
gst_pad_set_active (mysinkpad, FALSE);
|
||||||
gst_check_teardown_sink_pad (jpegenc);
|
gst_check_teardown_sink_pad (jpegenc);
|
||||||
|
|
|
@ -241,6 +241,7 @@ GST_START_TEST (test_message_is_valid)
|
||||||
gst_object_unref (bus);
|
gst_object_unref (bus);
|
||||||
gst_element_set_state (level, GST_STATE_NULL);
|
gst_element_set_state (level, GST_STATE_NULL);
|
||||||
cleanup_level (level);
|
cleanup_level (level);
|
||||||
|
gst_check_drop_buffers ();
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
|
@ -371,6 +371,7 @@ GST_START_TEST (test_multifilesrc_stop_index)
|
||||||
|
|
||||||
gst_element_set_state (src, GST_STATE_NULL);
|
gst_element_set_state (src, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_check_teardown_pad_by_name (src, "src");
|
gst_check_teardown_pad_by_name (src, "src");
|
||||||
gst_check_teardown_element (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);
|
fail_unless (gst_pad_push_event (mysrcpad, gst_event_new_eos ()) == TRUE);
|
||||||
|
|
||||||
cleanup_qtmux (qtmux, "video_%u");
|
cleanup_qtmux (qtmux, "video_%u");
|
||||||
|
gst_check_drop_buffers ();
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
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 (qtmux, GST_STATE_NULL);
|
||||||
gst_element_set_state (filesink, GST_STATE_NULL);
|
gst_element_set_state (filesink, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_pad_set_active (mysrcpad, FALSE);
|
gst_pad_set_active (mysrcpad, FALSE);
|
||||||
teardown_src_pad (mysrcpad);
|
teardown_src_pad (mysrcpad);
|
||||||
gst_object_unref (filesink);
|
gst_object_unref (filesink);
|
||||||
|
|
|
@ -138,6 +138,7 @@ cleanup_rtprtx (GstElement * rtprtxsend, GstElement * rtprtxreceive)
|
||||||
g_list_free (inbuffers);
|
g_list_free (inbuffers);
|
||||||
inbuffers = NULL;
|
inbuffers = NULL;
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_pad_set_active (srcpad, FALSE);
|
gst_pad_set_active (srcpad, FALSE);
|
||||||
gst_check_teardown_src_pad (rtprtxsend);
|
gst_check_teardown_src_pad (rtprtxsend);
|
||||||
gst_check_teardown_element (rtprtxsend);
|
gst_check_teardown_element (rtprtxsend);
|
||||||
|
|
|
@ -125,6 +125,7 @@ no_socket:
|
||||||
|
|
||||||
gst_element_set_state (udpsrc, GST_STATE_NULL);
|
gst_element_set_state (udpsrc, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_check_teardown_pad_by_name (udpsrc, "src");
|
gst_check_teardown_pad_by_name (udpsrc, "src");
|
||||||
gst_check_teardown_element (udpsrc);
|
gst_check_teardown_element (udpsrc);
|
||||||
|
|
||||||
|
@ -222,6 +223,7 @@ send_failure:
|
||||||
|
|
||||||
gst_element_set_state (udpsrc, GST_STATE_NULL);
|
gst_element_set_state (udpsrc, GST_STATE_NULL);
|
||||||
|
|
||||||
|
gst_check_drop_buffers ();
|
||||||
gst_check_teardown_pad_by_name (udpsrc, "src");
|
gst_check_teardown_pad_by_name (udpsrc, "src");
|
||||||
gst_check_teardown_element (udpsrc);
|
gst_check_teardown_element (udpsrc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue