From 135e12565b5b79ea5d2d2f15b569060ce2c64b76 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 2 May 2019 22:14:35 -0700 Subject: [PATCH] rtspsrc: do not try to send EOS with invalid seqnum The second udpsrc (rtcp) might not have seen the segment event if it was not enabled or if rtcp is not available on the server. So if the application tries to send an EOS event it will try to set an invalid seqnum to the event. --- gst/rtsp/gstrtspsrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 7ee4736056..cc97bf75f2 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -4886,7 +4886,9 @@ gst_rtspsrc_stream_push_event (GstRTSPSrc * src, GstRTSPStream * stream, if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { sent_event = gst_event_new_eos (); - gst_event_set_seqnum (sent_event, stream->segment_seqnum[1]); + if (stream->segment_seqnum[1] != GST_SEQNUM_INVALID) { + gst_event_set_seqnum (sent_event, stream->segment_seqnum[1]); + } } else { sent_event = gst_event_ref (event); }