From 686302576f714176c771121fc13f3c492ff9bb93 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 9 Jul 2014 18:33:35 +0530 Subject: encode: Fix some leaks --- src/encode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/encode.c b/src/encode.c index caaaa46..a149219 100644 --- a/src/encode.c +++ b/src/encode.c @@ -23,6 +23,7 @@ on_autoplug_continue (GstElement *decodebin, else ret = TRUE, g_debug ("encodebin cannot passthrough %s\n", name); + gst_object_unref (sinkpad); g_free (name); return ret; } @@ -64,6 +65,7 @@ on_decodebin_pad_added (GstElement *decodebin, out: g_free (name); gst_caps_unref (caps); + gst_object_unref (sinkpad); return; } @@ -89,6 +91,7 @@ create_webm_profile (void) "undershoot", 95, NULL); gst_preset_save_preset (vp8preset, "stp_vp8preset"); + gst_object_unref (GST_OBJECT (vp8preset)); caps = gst_caps_from_string ("video/x-vp8"); t = (GstEncodingProfile*) gst_encoding_video_profile_new (caps, "stp_vp8preset", @@ -163,4 +166,5 @@ stp_encode_from_msg (TranscodeServerCtx *ctx) gst_bus_add_signal_watch (bus); g_signal_connect (bus, "message", G_CALLBACK (stp_on_gst_bus_message), ctx); g_object_unref (bus); + gst_encoding_profile_unref (profile); } -- cgit v0.11.2-2-gd1dd