mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
rtspsrc: Set to PLAYING after a seek again after setting up the segment and everything else
There's a small window for a race condition otherwise.
This commit is contained in:
parent
6289280535
commit
b9532527ec
1 changed files with 9 additions and 9 deletions
|
@ -2184,15 +2184,6 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
/* PLAY will add the range header now. */
|
||||
src->need_range = TRUE;
|
||||
|
||||
/* and continue playing if needed */
|
||||
GST_OBJECT_LOCK (src);
|
||||
playing = (GST_STATE_PENDING (src) == GST_STATE_VOID_PENDING
|
||||
&& GST_STATE (src) == GST_STATE_PLAYING)
|
||||
|| (GST_STATE_PENDING (src) == GST_STATE_PLAYING);
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
if (playing)
|
||||
gst_rtspsrc_play (src, &seeksegment, FALSE);
|
||||
|
||||
/* prepare for streaming again */
|
||||
if (flush) {
|
||||
/* if we started flush, we stop now */
|
||||
|
@ -2221,6 +2212,15 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
stream->discont = TRUE;
|
||||
}
|
||||
|
||||
/* and continue playing if needed */
|
||||
GST_OBJECT_LOCK (src);
|
||||
playing = (GST_STATE_PENDING (src) == GST_STATE_VOID_PENDING
|
||||
&& GST_STATE (src) == GST_STATE_PLAYING)
|
||||
|| (GST_STATE_PENDING (src) == GST_STATE_PLAYING);
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
if (playing)
|
||||
gst_rtspsrc_play (src, &seeksegment, FALSE);
|
||||
|
||||
GST_RTSP_STREAM_UNLOCK (src);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue