From 4d2f000125ba454cb8e514e7e5ca98313271c8f2 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 29 Feb 2024 11:14:47 +1100 Subject: [PATCH] rtspsrc: return NO_PREROLL on PLAYING->PAUSED too When transitioning back to PAUSED and rtspsrc is live, return NO_PREROLL so the pipeline knows to skip preroll here too. Part-of: --- subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index 4dfdfe0c72..1cd0036508 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -9648,8 +9648,10 @@ gst_rtspsrc_change_state (GstElement * element, GstStateChange transition) if (rtspsrc->is_live) { /* send pause request and keep the idle task around */ gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_PAUSE, CMD_LOOP); + ret = GST_STATE_CHANGE_NO_PREROLL; + } else { + ret = GST_STATE_CHANGE_SUCCESS; } - ret = GST_STATE_CHANGE_SUCCESS; break; case GST_STATE_CHANGE_PAUSED_TO_READY: rtspsrc->seek_seqnum = GST_SEQNUM_INVALID;