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
@ -2184,15 +2184,6 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||||||
/* PLAY will add the range header now. */
|
/* PLAY will add the range header now. */
|
||||||
src->need_range = TRUE;
|
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 */
|
/* prepare for streaming again */
|
||||||
if (flush) {
|
if (flush) {
|
||||||
/* if we started flush, we stop now */
|
/* if we started flush, we stop now */
|
||||||
@ -2221,6 +2212,15 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||||||
stream->discont = TRUE;
|
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);
|
GST_RTSP_STREAM_UNLOCK (src);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user