From b1816862110db338428b6b1aaf919090d630d826 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 14 Nov 2022 18:40:56 +0200 Subject: [PATCH] rtspsrc: Reset EOS flag also on FLUSH_STOP and not only on ssrc-active Also don't bother not sending EOS if EOS was sent already: gst_pad_push_event() takes care of that for us already. Part-of: --- subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index 8763f1b..65f767d 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -3640,19 +3640,7 @@ gst_rtspsrc_do_stream_eos (GstRTSPSrc * src, GstRTSPStream * stream) { GST_DEBUG_OBJECT (src, "setting stream for session %u to EOS", stream->id); - if (stream->eos) - goto was_eos; - - stream->eos = TRUE; gst_rtspsrc_stream_push_event (src, stream, gst_event_new_eos ()); - return; - - /* ERRORS */ -was_eos: - { - GST_DEBUG_OBJECT (src, "stream for session %u was already EOS", stream->id); - return; - } } static void @@ -5155,6 +5143,17 @@ gst_rtspsrc_stream_push_event (GstRTSPSrc * src, GstRTSPStream * stream, if (!stream->setup) goto done; + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_EOS: + stream->eos = TRUE; + break; + case GST_EVENT_FLUSH_STOP: + stream->eos = FALSE; + break; + default: + break; + } + if (stream->udpsrc[0]) { GstEvent *sent_event; -- 2.7.4