rtspsrc: fix invalid seqnum assertions

Upon fatal errors the loop function will first post an error message
then push out an EOS event.

An application may react immediately to the error message by setting the
state of the pipeline to NULL, meaning by the time we push out the EOS
event PAUSED_TO_READY may have reset the seek seqnum to -1.

While this is harmless, the assertion when setting an invalid seqnum
isn't tidy, fix this by simply not resetting to INVALID as it serves no
practical purpose and the next READY_TO_PAUSED will select a new seqnum
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7265>
This commit is contained in:
Mathieu Duponchelle 2024-06-13 18:23:46 +02:00 committed by GStreamer Marge Bot
parent b8fdd7f72a
commit b5a308b70a

View file

@ -9585,7 +9585,6 @@ gst_rtspsrc_change_state (GstElement * element, GstStateChange transition)
}
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
rtspsrc->seek_seqnum = GST_SEQNUM_INVALID;
gst_rtspsrc_loop_send_cmd_and_wait (rtspsrc, CMD_CLOSE, CMD_ALL,
rtspsrc->teardown_timeout);
ret = GST_STATE_CHANGE_SUCCESS;