summaryrefslogtreecommitdiff
path: root/gst/rtpmanager/gstrtpssrcdemux.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtpmanager/gstrtpssrcdemux.c')
-rw-r--r--gst/rtpmanager/gstrtpssrcdemux.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gst/rtpmanager/gstrtpssrcdemux.c b/gst/rtpmanager/gstrtpssrcdemux.c
index 523f9c509..644034cdc 100644
--- a/gst/rtpmanager/gstrtpssrcdemux.c
+++ b/gst/rtpmanager/gstrtpssrcdemux.c
@@ -541,6 +541,17 @@ gst_rtp_ssrc_demux_chain (GstPad * pad, GstBuffer * buf)
/* push to srcpad */
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);
return ret;
@@ -606,6 +617,17 @@ gst_rtp_ssrc_demux_rtcp_chain (GstPad * pad, GstBuffer * buf)
/* push to srcpad */
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);
return ret;