summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-01-27 15:24:24 +0100
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-01-27 17:05:34 +0100
commit71e35b2bf341b9073340b5ca776cbd45605b7965 (patch)
tree9c39a2dc62324b4a81775d7eaa913233537bf20d
parentc529145e4b1b74fcfdf8c9a387a7dafdcd4eb4b5 (diff)
rtpspeexpay: fix occasional buffer leak
Fixes #608255.
-rw-r--r--gst/rtp/gstrtpspeexpay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtp/gstrtpspeexpay.c b/gst/rtp/gstrtpspeexpay.c
index 05c86fcf8..7b4728da4 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;
}
}