rtspsrc: do not try to send EOS with invalid seqnum
authorThiago Santos <thiagossantos@gmail.com>
Fri, 3 May 2019 05:14:35 +0000 (22:14 -0700)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 7 Aug 2019 07:49:34 +0000 (08:49 +0100)
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

index 7ee4736..cc97bf7 100644 (file)
@@ -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);
     }