From 9dfae82566ac5d3e5c2bce59614cfd9278cc9a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 3 Jul 2015 12:18:52 +0200 Subject: [PATCH] rtpmpvdepay: Don't forget to unmap the input buffer --- gst/rtp/gstrtpmpvdepay.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gst/rtp/gstrtpmpvdepay.c b/gst/rtp/gstrtpmpvdepay.c index 7d8646cd2c..e65df92fec 100644 --- a/gst/rtp/gstrtpmpvdepay.c +++ b/gst/rtp/gstrtpmpvdepay.c @@ -117,7 +117,7 @@ static GstBuffer * gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) { GstRtpMPVDepay *rtpmpvdepay; - GstBuffer *outbuf; + GstBuffer *outbuf = NULL; GstRTPBuffer rtp = { NULL }; rtpmpvdepay = GST_RTP_MPV_DEPAY (depayload); @@ -176,16 +176,19 @@ gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) "gst_rtp_mpv_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT, gst_buffer_get_size (outbuf)); } - return outbuf; } - return NULL; + gst_rtp_buffer_unmap (&rtp); + + return outbuf; /* ERRORS */ empty_packet: { GST_ELEMENT_WARNING (rtpmpvdepay, STREAM, DECODE, (NULL), ("Empty payload.")); + gst_rtp_buffer_unmap (&rtp); + gst_buffer_unref (buf); return NULL; } }