mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtspsrc: Fix race saving seek event seqnum.
We need to save the seek seqnum before the flush stop event since that will start the basesrc task which may send the segment event before we're ready. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/954>
This commit is contained in:
parent
8e8dab7a4d
commit
b705fb93be
1 changed files with 5 additions and 5 deletions
|
@ -2875,6 +2875,11 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
/* PLAY will add the range header now. */
|
||||
src->need_range = TRUE;
|
||||
|
||||
/* If an accurate seek was requested, we want to clip the segment we
|
||||
* output in ONVIF mode to the requested bounds */
|
||||
src->clip_out_segment = ! !(flags & GST_SEEK_FLAG_ACCURATE);
|
||||
src->seek_seqnum = gst_event_get_seqnum (event);
|
||||
|
||||
/* prepare for streaming again */
|
||||
if (flush) {
|
||||
/* if we started flush, we stop now */
|
||||
|
@ -2923,11 +2928,6 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
seek_style = "Next";
|
||||
}
|
||||
|
||||
/* If an accurate seek was requested, we want to clip the segment we
|
||||
* output in ONVIF mode to the requested bounds */
|
||||
src->clip_out_segment = ! !(flags & GST_SEEK_FLAG_ACCURATE);
|
||||
src->seek_seqnum = gst_event_get_seqnum (event);
|
||||
|
||||
if (playing)
|
||||
gst_rtspsrc_play (src, &seeksegment, FALSE, seek_style);
|
||||
|
||||
|
|
Loading…
Reference in a new issue