diff --git a/ChangeLog b/ChangeLog index 0b685974ce..a6647c480e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-04-11 Tim-Philipp Müller + + Patch by: Antoine Tremblay + + * gst-libs/gst/rtp/gstbasertpdepayload.c: + (gst_base_rtp_depayload_finalize), (gst_base_rtp_depayload_push): + Fix some memory leaks: on finalize, free buffers left in the queue + before destroying the queue; in _push(), unref rtp_buf even if + the process vfunc returned a NULL buffer as output buffer (#337548); + demote some recuring debug messages to LOG level. + 2006-04-11 Wim Taymans * ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query), diff --git a/gst-libs/gst/rtp/gstbasertpdepayload.c b/gst-libs/gst/rtp/gstbasertpdepayload.c index 26e338f252..ba9d8dc50f 100644 --- a/gst-libs/gst/rtp/gstbasertpdepayload.c +++ b/gst-libs/gst/rtp/gstbasertpdepayload.c @@ -164,6 +164,10 @@ gst_base_rtp_depayload_init (GstBaseRTPDepayload * filter, gpointer g_class) static void gst_base_rtp_depayload_finalize (GObject * object) { + GstBuffer *buf; + + while ((buf = g_queue_pop_head (GST_BASE_RTP_DEPAYLOAD (object)->queue))) + gst_buffer_unref (buf); g_queue_free (GST_BASE_RTP_DEPAYLOAD (object)->queue); if (G_OBJECT_CLASS (parent_class)->finalize) @@ -321,12 +325,12 @@ gst_base_rtp_depayload_push (GstBaseRTPDepayload * filter, GstBuffer * rtp_buf) bclass->set_gst_timestamp (filter, gst_rtp_buffer_get_timestamp (rtp_buf), out_buf); /* push it */ - GST_DEBUG_OBJECT (filter, "Pushing buffer size %d, timestamp %u", + GST_LOG_OBJECT (filter, "Pushing buffer size %d, timestamp %u", GST_BUFFER_SIZE (out_buf), GST_BUFFER_TIMESTAMP (out_buf)); gst_pad_push (filter->srcpad, GST_BUFFER (out_buf)); - gst_buffer_unref (rtp_buf); - GST_DEBUG_OBJECT (filter, "Pushed buffer"); + GST_LOG_OBJECT (filter, "Pushed buffer"); } + gst_buffer_unref (rtp_buf); } static void