playback-test: fix memory leak

context during main and filter list during init
visualization are not being freed resulting in memory leak
and app->vis_entries

https://bugzilla.gnome.org/show_bug.cgi?id=752359
This commit is contained in:
Vineeth T M 2015-07-14 13:00:03 +09:00 committed by Thiago Santos
parent 9c2e08c54d
commit 07d5e7ab4d

View file

@ -1317,6 +1317,7 @@ init_visualization_features (PlaybackApp * app)
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (app->vis_combo), name); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (app->vis_combo), name);
} }
gtk_combo_box_set_active (GTK_COMBO_BOX (app->vis_combo), 0); gtk_combo_box_set_active (GTK_COMBO_BOX (app->vis_combo), 0);
gst_plugin_feature_list_free (list);
} }
static void static void
@ -3381,7 +3382,7 @@ reset_app (PlaybackApp * app)
g_list_free (app->paths); g_list_free (app->paths);
g_list_foreach (app->sub_paths, (GFunc) g_free, NULL); g_list_foreach (app->sub_paths, (GFunc) g_free, NULL);
g_list_free (app->sub_paths); g_list_free (app->sub_paths);
g_array_free (app->vis_entries, TRUE);
g_print ("free pipeline\n"); g_print ("free pipeline\n");
gst_object_unref (app->pipeline); gst_object_unref (app->pipeline);
} }
@ -3411,7 +3412,7 @@ main (int argc, char **argv)
g_print ("Error initializing: %s\n", err->message); g_print ("Error initializing: %s\n", err->message);
exit (1); exit (1);
} }
g_option_context_free (ctx);
GST_DEBUG_CATEGORY_INIT (playback_debug, "playback-test", 0, GST_DEBUG_CATEGORY_INIT (playback_debug, "playback-test", 0,
"playback example"); "playback example");