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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3409>
{
GST_DEBUG_OBJECT (src, "setting stream for session %u to EOS", stream->id);
{
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 ());
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;
- }
if (!stream->setup)
goto done;
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;
if (stream->udpsrc[0]) {
GstEvent *sent_event;