mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
ofa: Remove bus GSource to prevent a valgrind warning
This commit is contained in:
parent
93454118c6
commit
c8ae803df9
1 changed files with 12 additions and 15 deletions
|
@ -84,11 +84,10 @@ GST_START_TEST (test_ofa_le_1ch)
|
|||
|
||||
GstBus *bus;
|
||||
GMainLoop *loop;
|
||||
|
||||
GstCaps *caps;
|
||||
|
||||
gint64 position;
|
||||
GstFormat fmt = GST_FORMAT_TIME;
|
||||
guint bus_watch = 0;
|
||||
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
fail_unless (pipeline != NULL);
|
||||
|
@ -129,7 +128,7 @@ GST_START_TEST (test_ofa_le_1ch)
|
|||
|
||||
bus = gst_element_get_bus (pipeline);
|
||||
fail_unless (bus != NULL);
|
||||
gst_bus_add_watch (bus, bus_handler, loop);
|
||||
bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
|
||||
gst_object_unref (bus);
|
||||
|
||||
found_fingerprint = FALSE;
|
||||
|
@ -144,6 +143,7 @@ GST_START_TEST (test_ofa_le_1ch)
|
|||
fail_unless (found_fingerprint == TRUE);
|
||||
g_object_unref (pipeline);
|
||||
g_main_loop_unref (loop);
|
||||
g_source_remove (bus_watch);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
@ -153,14 +153,12 @@ GST_START_TEST (test_ofa_be_1ch)
|
|||
{
|
||||
GstElement *pipeline;
|
||||
GstElement *audiotestsrc, *audioconvert, *capsfilter, *ofa, *fakesink;
|
||||
|
||||
GstBus *bus;
|
||||
GMainLoop *loop;
|
||||
|
||||
GstCaps *caps;
|
||||
|
||||
gint64 position;
|
||||
GstFormat fmt = GST_FORMAT_TIME;
|
||||
guint bus_watch = 0;
|
||||
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
fail_unless (pipeline != NULL);
|
||||
|
@ -201,7 +199,7 @@ GST_START_TEST (test_ofa_be_1ch)
|
|||
|
||||
bus = gst_element_get_bus (pipeline);
|
||||
fail_unless (bus != NULL);
|
||||
gst_bus_add_watch (bus, bus_handler, loop);
|
||||
bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
|
||||
gst_object_unref (bus);
|
||||
|
||||
found_fingerprint = FALSE;
|
||||
|
@ -216,6 +214,7 @@ GST_START_TEST (test_ofa_be_1ch)
|
|||
fail_unless (found_fingerprint == TRUE);
|
||||
g_object_unref (pipeline);
|
||||
g_main_loop_unref (loop);
|
||||
g_source_remove (bus_watch);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
@ -224,14 +223,12 @@ GST_START_TEST (test_ofa_le_2ch)
|
|||
{
|
||||
GstElement *pipeline;
|
||||
GstElement *audiotestsrc, *audioconvert, *capsfilter, *ofa, *fakesink;
|
||||
|
||||
GstBus *bus;
|
||||
GMainLoop *loop;
|
||||
|
||||
GstCaps *caps;
|
||||
|
||||
gint64 position;
|
||||
GstFormat fmt = GST_FORMAT_TIME;
|
||||
guint bus_watch = 0;
|
||||
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
fail_unless (pipeline != NULL);
|
||||
|
@ -272,7 +269,7 @@ GST_START_TEST (test_ofa_le_2ch)
|
|||
|
||||
bus = gst_element_get_bus (pipeline);
|
||||
fail_unless (bus != NULL);
|
||||
gst_bus_add_watch (bus, bus_handler, loop);
|
||||
bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
|
||||
gst_object_unref (bus);
|
||||
|
||||
found_fingerprint = FALSE;
|
||||
|
@ -287,6 +284,7 @@ GST_START_TEST (test_ofa_le_2ch)
|
|||
fail_unless (found_fingerprint == TRUE);
|
||||
g_object_unref (pipeline);
|
||||
g_main_loop_unref (loop);
|
||||
g_source_remove (bus_watch);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
@ -296,14 +294,12 @@ GST_START_TEST (test_ofa_be_2ch)
|
|||
{
|
||||
GstElement *pipeline;
|
||||
GstElement *audiotestsrc, *audioconvert, *capsfilter, *ofa, *fakesink;
|
||||
|
||||
GstBus *bus;
|
||||
GMainLoop *loop;
|
||||
|
||||
GstCaps *caps;
|
||||
|
||||
gint64 position;
|
||||
GstFormat fmt = GST_FORMAT_TIME;
|
||||
guint bus_watch = 0;
|
||||
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
fail_unless (pipeline != NULL);
|
||||
|
@ -344,7 +340,7 @@ GST_START_TEST (test_ofa_be_2ch)
|
|||
|
||||
bus = gst_element_get_bus (pipeline);
|
||||
fail_unless (bus != NULL);
|
||||
gst_bus_add_watch (bus, bus_handler, loop);
|
||||
bus_watch = gst_bus_add_watch (bus, bus_handler, loop);
|
||||
gst_object_unref (bus);
|
||||
|
||||
found_fingerprint = FALSE;
|
||||
|
@ -359,6 +355,7 @@ GST_START_TEST (test_ofa_be_2ch)
|
|||
fail_unless (found_fingerprint == TRUE);
|
||||
g_object_unref (pipeline);
|
||||
g_main_loop_unref (loop);
|
||||
g_source_remove (bus_watch);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
Loading…
Reference in a new issue