From 71e35b2bf341b9073340b5ca776cbd45605b7965 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 27 Jan 2010 15:24:24 +0100 Subject: [PATCH] rtpspeexpay: fix occasional buffer leak Fixes #608255. --- gst/rtp/gstrtpspeexpay.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtpspeexpay.c b/gst/rtp/gstrtpspeexpay.c index 05c86fcf8c..7b4728da42 100644 --- a/gst/rtp/gstrtpspeexpay.c +++ b/gst/rtp/gstrtpspeexpay.c @@ -284,11 +284,11 @@ gst_rtp_speex_pay_handle_buffer (GstBaseRTPPayload * basepayload, /* copy data in payload */ memcpy (&payload[0], data, size); - gst_buffer_unref (buffer); - ret = gst_basertppayload_push (basepayload, outbuf); done: + gst_buffer_unref (buffer); + rtpspeexpay->packet++; return ret; @@ -298,6 +298,7 @@ parse_error: { GST_ELEMENT_ERROR (rtpspeexpay, STREAM, DECODE, (NULL), ("Error parsing first identification packet.")); + gst_buffer_unref (buffer); return GST_FLOW_ERROR; } }