Skip to content

Commit 429c841

Browse files
committed
rtpmanager/rtpssrcdemux: ignore FLOW_EOS as well as NOT_LINKED
Turns out that both can happen if you push on a pad that is being ripped away, so ignore them both. Also fixup test to compare a flow-return using int compare, since they are mostly negative!
1 parent 599ed00 commit 429c841

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

subprojects/gst-plugins-good/gst/rtpmanager/gstrtpssrcdemux.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,13 @@ gst_rtp_ssrc_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
709709
/* push to srcpad */
710710
ret = gst_pad_push (srcpad, buf);
711711

712-
if (ret == GST_FLOW_NOT_LINKED) {
713-
/* on not-linked, this *could* happen because the ssrc got
712+
if (ret == GST_FLOW_NOT_LINKED || ret = GST_FLOW_EOS) {
713+
/* on not-linked and eos this *could* happen because the ssrc got
714714
removed while we were pushing, and since it can also be
715715
re-created, we can't know for sure if the removal was the
716-
real reason, so simply ignore not-linked here */
717-
GST_INFO_OBJECT (demux, "Ignoring not-linked flow return");
716+
real reason, so simply ignore here */
717+
GST_INFO_OBJECT (demux, "Ignoring flow return: %s",
718+
gst_flow_get_name (ret));
718719

719720
ret = GST_FLOW_OK;
720721
}

subprojects/gst-plugins-good/tests/check/elements/rtpssrcdemux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ _stress_push_rtp_buffers (gpointer user_data)
464464

465465
gst_harness_set_src_caps_str (h, "application/x-rtp");
466466
while (running) {
467-
fail_unless_equals_uint64 (GST_FLOW_OK,
467+
fail_unless_equals_int (GST_FLOW_OK,
468468
gst_harness_push (h, create_buffer (0, ssrc)));
469469
g_usleep (G_USEC_PER_SEC / 100);
470470
ssrc++;
@@ -483,7 +483,7 @@ _stress_push_rtcp_buffers (gpointer user_data)
483483

484484
gst_harness_set_src_caps_str (h, "application/x-rtcp");
485485
while (running) {
486-
fail_unless_equals_uint64 (GST_FLOW_OK,
486+
fail_unless_equals_int (GST_FLOW_OK,
487487
gst_harness_push (h, generate_rtcp_sr_buffer (ssrc)));
488488
g_usleep (G_USEC_PER_SEC / 90);
489489
ssrc++;

0 commit comments

Comments
 (0)