mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
rtpssrcdemux: Safely push on pads that might be removed due to a RTCP BYE
https://bugzilla.gnome.org/show_bug.cgi?id=667815
This commit is contained in:
parent
ace3307fc9
commit
f459fe2673
1 changed files with 22 additions and 0 deletions
|
@ -644,6 +644,17 @@ gst_rtp_ssrc_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
/* push to srcpad */
|
/* push to srcpad */
|
||||||
ret = gst_pad_push (srcpad, buf);
|
ret = gst_pad_push (srcpad, buf);
|
||||||
|
|
||||||
|
if (ret != GST_FLOW_OK) {
|
||||||
|
// check if the ssrc still there, may have been removed
|
||||||
|
GST_PAD_LOCK (demux);
|
||||||
|
dpad = find_demux_pad_for_ssrc (demux, ssrc);
|
||||||
|
if (dpad == NULL || dpad->rtp_pad != srcpad) {
|
||||||
|
// SSRC was removed during the push ... ignore the error
|
||||||
|
ret = GST_FLOW_OK;
|
||||||
|
}
|
||||||
|
GST_PAD_UNLOCK (demux);
|
||||||
|
}
|
||||||
|
|
||||||
gst_object_unref (srcpad);
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -709,6 +720,17 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstObject * parent,
|
||||||
/* push to srcpad */
|
/* push to srcpad */
|
||||||
ret = gst_pad_push (srcpad, buf);
|
ret = gst_pad_push (srcpad, buf);
|
||||||
|
|
||||||
|
if (ret != GST_FLOW_OK) {
|
||||||
|
// check if the ssrc still there, may have been removed
|
||||||
|
GST_PAD_LOCK (demux);
|
||||||
|
dpad = find_demux_pad_for_ssrc (demux, ssrc);
|
||||||
|
if (dpad == NULL || dpad->rtcp_pad != srcpad) {
|
||||||
|
// SSRC was removed during the push ... ignore the error
|
||||||
|
ret = GST_FLOW_OK;
|
||||||
|
}
|
||||||
|
GST_PAD_UNLOCK (demux);
|
||||||
|
}
|
||||||
|
|
||||||
gst_object_unref (srcpad);
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue