From 2015d56a414d227bf2cc76a1c6e46209ae62ea1c Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 13 Jun 2024 18:23:46 +0200 Subject: [PATCH] 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: --- subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index 385fbcdec6..fdde01f880 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -9678,7 +9678,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;