From 84c3b0635310e6d90d9422cb384f89c5074d9e35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 18 Apr 2011 11:14:32 +0200 Subject: [PATCH] wavenc: Remove bus GSource to prevent a valgrind warning --- tests/check/pipelines/wavenc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/check/pipelines/wavenc.c b/tests/check/pipelines/wavenc.c index ee5a3ff..ab9f62b 100644 --- a/tests/check/pipelines/wavenc.c +++ b/tests/check/pipelines/wavenc.c @@ -69,6 +69,7 @@ make_n_channel_wav (const gint channels, const GValueArray * arr) GstBus *bus; GMainLoop *loop; guint i; + guint bus_watch = 0; audiotestsrc = g_new0 (GstElement *, channels); @@ -104,7 +105,7 @@ make_n_channel_wav (const gint channels, const GValueArray * arr) 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); gst_element_set_state (pipeline, GST_STATE_PLAYING); @@ -113,6 +114,9 @@ make_n_channel_wav (const gint channels, const GValueArray * arr) gst_object_unref (pipeline); g_free (audiotestsrc); + + g_main_loop_unref (loop); + g_source_remove (bus_watch); } GST_START_TEST (test_encode_stereo) -- 2.7.4