rtpmpvdepay: Don't forget to unmap the input buffer

This commit is contained in:
Sebastian Dröge 2015-07-03 12:18:52 +02:00
parent 7e1d28d27f
commit 9dfae82566

View file

@ -117,7 +117,7 @@ static GstBuffer *
gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) gst_rtp_mpv_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
{ {
GstRtpMPVDepay *rtpmpvdepay; GstRtpMPVDepay *rtpmpvdepay;
GstBuffer *outbuf; GstBuffer *outbuf = NULL;
GstRTPBuffer rtp = { NULL }; GstRTPBuffer rtp = { NULL };
rtpmpvdepay = GST_RTP_MPV_DEPAY (depayload); 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_rtp_mpv_depay_chain: pushing buffer of size %" G_GSIZE_FORMAT,
gst_buffer_get_size (outbuf)); gst_buffer_get_size (outbuf));
} }
return outbuf;
} }
return NULL; gst_rtp_buffer_unmap (&rtp);
return outbuf;
/* ERRORS */ /* ERRORS */
empty_packet: empty_packet:
{ {
GST_ELEMENT_WARNING (rtpmpvdepay, STREAM, DECODE, GST_ELEMENT_WARNING (rtpmpvdepay, STREAM, DECODE,
(NULL), ("Empty payload.")); (NULL), ("Empty payload."));
gst_rtp_buffer_unmap (&rtp);
gst_buffer_unref (buf);
return NULL; return NULL;
} }
} }