mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
tests: collectpads: fix for CK_FORK=no
Reset global state when done, and unref sink pads too in teardown function to make it valgrind clean. https://bugzilla.gnome.org/show_bug.cgi?id=623469
This commit is contained in:
parent
71f554009d
commit
f9eb3b98f1
1 changed files with 13 additions and 0 deletions
|
@ -423,9 +423,14 @@ setup_buffer_cb (void)
|
|||
static void
|
||||
teardown (void)
|
||||
{
|
||||
gst_object_unref (srcpad1);
|
||||
gst_object_unref (srcpad2);
|
||||
gst_object_unref (sinkpad1);
|
||||
gst_object_unref (sinkpad2);
|
||||
gst_object_unref (collect);
|
||||
srcpad1 = srcpad2 = NULL;
|
||||
sinkpad1 = sinkpad2 = NULL;
|
||||
collect = NULL;
|
||||
}
|
||||
|
||||
GST_START_TEST (test_pad_add_remove)
|
||||
|
@ -857,6 +862,9 @@ flush_setup (void)
|
|||
g_atomic_int_set (&flush_start_events, 0);
|
||||
g_atomic_int_set (&flush_stop_events, 0);
|
||||
gst_element_set_state (agg, GST_STATE_PLAYING);
|
||||
outbuf1 = NULL;
|
||||
outbuf2 = NULL;
|
||||
collected = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -869,6 +877,10 @@ flush_teardown (void)
|
|||
gst_object_unref (srcpad2);
|
||||
g_free (data1);
|
||||
g_free (data2);
|
||||
agg = NULL;
|
||||
agg_srcpad = NULL;
|
||||
srcpad1 = srcpad2 = NULL;
|
||||
data1 = data2 = NULL;
|
||||
}
|
||||
|
||||
GST_START_TEST (test_flushing_seek_failure)
|
||||
|
@ -1071,6 +1083,7 @@ gst_collect_pads_suite (void)
|
|||
suite_add_tcase (suite, general);
|
||||
tcase_add_checked_fixture (general, setup, teardown);
|
||||
tcase_add_test (general, test_pad_add_remove);
|
||||
|
||||
tcase_add_test (general, test_collect);
|
||||
tcase_add_test (general, test_collect_eos);
|
||||
tcase_add_test (general, test_collect_twice);
|
||||
|
|
Loading…
Reference in a new issue