rtpmux: Don't leak invalid buffers

This commit is contained in:
Olivier Crête 2010-07-01 15:15:49 -04:00
parent 7950499805
commit 5d21b0815a

View file

@ -318,6 +318,7 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer)
rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad)); rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad));
if (!gst_rtp_buffer_validate (buffer)) { if (!gst_rtp_buffer_validate (buffer)) {
gst_buffer_unref (buffer);
GST_ERROR_OBJECT (rtp_mux, "Invalid RTP buffer"); GST_ERROR_OBJECT (rtp_mux, "Invalid RTP buffer");
gst_object_unref (rtp_mux); gst_object_unref (rtp_mux);
return GST_FLOW_ERROR; return GST_FLOW_ERROR;