mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
basesrc: fix race in startup
Mark renegotiate before starting the pushing thread. Do also check if we are starting in the get_range function.
This commit is contained in:
parent
76a60c4c42
commit
18118218b1
1 changed files with 5 additions and 4 deletions
|
@ -2250,7 +2250,8 @@ again:
|
|||
}
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (!GST_BASE_SRC_IS_STARTED (src)))
|
||||
if (G_UNLIKELY (!GST_BASE_SRC_IS_STARTED (src)
|
||||
&& !GST_BASE_SRC_IS_STARTING (src)))
|
||||
goto not_started;
|
||||
|
||||
if (G_UNLIKELY (!bclass->create))
|
||||
|
@ -3051,6 +3052,8 @@ gst_base_src_start_complete (GstBaseSrc * basesrc, GstFlowReturn ret)
|
|||
* we are not yet PLAYING */
|
||||
gst_base_src_set_flushing (basesrc, FALSE, FALSE, FALSE, NULL);
|
||||
|
||||
gst_pad_mark_reconfigure (GST_BASE_SRC_PAD (basesrc));
|
||||
|
||||
GST_OBJECT_LOCK (basesrc->srcpad);
|
||||
mode = GST_PAD_MODE (basesrc->srcpad);
|
||||
GST_OBJECT_UNLOCK (basesrc->srcpad);
|
||||
|
@ -3076,8 +3079,6 @@ gst_base_src_start_complete (GstBaseSrc * basesrc, GstFlowReturn ret)
|
|||
goto no_get_range;
|
||||
}
|
||||
|
||||
gst_pad_mark_reconfigure (GST_BASE_SRC_PAD (basesrc));
|
||||
|
||||
GST_LIVE_LOCK (basesrc);
|
||||
GST_OBJECT_FLAG_SET (basesrc, GST_BASE_SRC_FLAG_STARTED);
|
||||
GST_OBJECT_FLAG_UNSET (basesrc, GST_BASE_SRC_FLAG_STARTING);
|
||||
|
@ -3115,7 +3116,7 @@ error:
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_base_src_start_complete:
|
||||
* gst_base_src_start_wait:
|
||||
* @src: base source instance
|
||||
* @ret: a #GstFlowReturn
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue