From 355736fc93a9b29501bdbfe9818274e9f247914f Mon Sep 17 00:00:00 2001 From: Aaron Boxer Date: Fri, 2 Aug 2019 10:26:24 -0400 Subject: [PATCH] playback-test: plug some memory leaks --- tests/examples/playback/playback-test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/examples/playback/playback-test.c b/tests/examples/playback/playback-test.c index c7a60fa84d..943cc7698e 100644 --- a/tests/examples/playback/playback-test.c +++ b/tests/examples/playback/playback-test.c @@ -3415,14 +3415,19 @@ set_defaults (PlaybackApp * app) static void reset_app (PlaybackApp * app) { - g_list_free (app->formats); + GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (app->pipeline)); + gst_bus_remove_signal_watch (bus); + gst_object_unref (bus); + g_list_free (app->formats); g_mutex_clear (&app->state_mutex); if (app->overlay_element) gst_object_unref (app->overlay_element); if (app->navigation_element) gst_object_unref (app->navigation_element); + if (app->colorbalance_element) + gst_object_unref (app->colorbalance_element); g_list_foreach (app->paths, (GFunc) g_free, NULL); g_list_free (app->paths); @@ -3562,6 +3567,7 @@ main (int argc, char **argv) gst_element_set_state (app.pipeline, GST_STATE_NULL); reset_app (&app); + gst_deinit (); return 0; }