From 8a7503ce2bcb2706ea1afe7f7e859ae062bc6ea2 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 21 Jun 2010 11:47:21 +0200 Subject: [PATCH] ges-launch: Properly free profile and outputuri --- tools/ges-launch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ges-launch.c b/tools/ges-launch.c index ce5b793205..bf7f391676 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -378,7 +378,6 @@ main (int argc, gchar ** argv) GOptionContext *ctx; GMainLoop *mainloop; GstBus *bus; - GstEncodingProfile *prof = NULL; if (!g_thread_supported ()) g_thread_init (NULL); @@ -430,6 +429,8 @@ main (int argc, gchar ** argv) /* Setup profile/encoding if needed */ if (render || smartrender) { + GstEncodingProfile *prof; + prof = make_encoding_profile (audio, video, video_restriction, container); if (!prof || @@ -437,6 +438,9 @@ main (int argc, gchar ** argv) || !ges_timeline_pipeline_set_mode (pipeline, smartrender ? TIMELINE_MODE_SMART_RENDER : TIMELINE_MODE_RENDER)) exit (-1); + + g_free (outputuri); + gst_encoding_profile_free (prof); } else { ges_timeline_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW); } @@ -458,7 +462,6 @@ main (int argc, gchar ** argv) gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); gst_object_unref (pipeline); - gst_encoding_profile_free (prof); return 0; }