mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
rtpmux: no need to ref pad in _chain()
This commit is contained in:
parent
e42d2eebcb
commit
2353f8d852
1 changed files with 2 additions and 7 deletions
|
@ -416,12 +416,11 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
GstEvent *newseg_event = NULL;
|
GstEvent *newseg_event = NULL;
|
||||||
gboolean drop;
|
gboolean drop;
|
||||||
|
|
||||||
rtp_mux = GST_RTP_MUX (gst_pad_get_parent (pad));
|
rtp_mux = GST_RTP_MUX (GST_OBJECT_PARENT (pad));
|
||||||
|
|
||||||
if (!gst_rtp_buffer_validate (buffer)) {
|
if (!gst_rtp_buffer_validate (buffer)) {
|
||||||
gst_buffer_unref (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);
|
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,9 +429,8 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
if (!padpriv) {
|
if (!padpriv) {
|
||||||
GST_OBJECT_UNLOCK (rtp_mux);
|
GST_OBJECT_UNLOCK (rtp_mux);
|
||||||
ret = GST_FLOW_NOT_LINKED;
|
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
goto out;
|
return GST_FLOW_NOT_LINKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer = gst_buffer_make_writable (buffer);
|
buffer = gst_buffer_make_writable (buffer);
|
||||||
|
@ -460,9 +458,6 @@ gst_rtp_mux_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
ret = gst_pad_push (rtp_mux->srcpad, buffer);
|
ret = gst_pad_push (rtp_mux->srcpad, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
|
|
||||||
gst_object_unref (rtp_mux);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue