From c479f9027460b26bb23231307bb1546620d35e28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?H=C3=A5vard=20Graff?= Date: Mon, 1 Dec 2008 17:54:58 -0500 Subject: [PATCH] rtpmux: Fix some more leaks --- gst/rtpmanager/gstrtpdtmfmux.c | 4 +++- gst/rtpmanager/gstrtpmux.c | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/gstrtpdtmfmux.c b/gst/rtpmanager/gstrtpdtmfmux.c index 52df8b5..4e0a86f 100644 --- a/gst/rtpmanager/gstrtpdtmfmux.c +++ b/gst/rtpmanager/gstrtpdtmfmux.c @@ -172,8 +172,10 @@ gst_rtp_dtmf_mux_chain (GstPad * pad, GstBuffer * buffer) GST_OBJECT_UNLOCK (mux); if (parent_class->chain_func) ret = parent_class->chain_func (pad, buffer); - else + else { + gst_buffer_unref (buffer); ret = GST_FLOW_ERROR; + } } gst_object_unref (mux); diff --git a/gst/rtpmanager/gstrtpmux.c b/gst/rtpmanager/gstrtpmux.c index ba7243e..34b9fd8 100644 --- a/gst/rtpmanager/gstrtpmux.c +++ b/gst/rtpmanager/gstrtpmux.c @@ -104,6 +104,8 @@ static void gst_rtp_mux_set_property (GObject * object, guint prop_id, static void gst_rtp_mux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +static gboolean gst_rtp_mux_src_event (GstPad * pad, GstEvent * event); + static GstElementClass *parent_class = NULL; GType @@ -211,6 +213,7 @@ static gboolean gst_rtp_mux_src_event (GstPad * pad, break; case GST_ITERATOR_RESYNC: gst_iterator_resync (iter); + result = FALSE; break; case GST_ITERATOR_ERROR: GST_WARNING_OBJECT (rtp_mux, "Error iterating sinkpads"); @@ -219,7 +222,8 @@ static gboolean gst_rtp_mux_src_event (GstPad * pad, break; } } - + gst_iterator_free (iter); + gst_object_unref (rtp_mux); gst_event_unref (event); return result; -- 2.7.4