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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
This commit is contained in:
Jan Schmidt 2024-02-29 11:14:47 +11:00 committed by GStreamer Marge Bot
parent 8356bd04a8
commit 4d2f000125

View file

@ -9648,8 +9648,10 @@ gst_rtspsrc_change_state (GstElement * element, GstStateChange transition)
if (rtspsrc->is_live) { if (rtspsrc->is_live) {
/* send pause request and keep the idle task around */ /* send pause request and keep the idle task around */
gst_rtspsrc_loop_send_cmd (rtspsrc, CMD_PAUSE, CMD_LOOP); 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; break;
case GST_STATE_CHANGE_PAUSED_TO_READY: case GST_STATE_CHANGE_PAUSED_TO_READY:
rtspsrc->seek_seqnum = GST_SEQNUM_INVALID; rtspsrc->seek_seqnum = GST_SEQNUM_INVALID;