mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
basesrc: Leave the loop function faster if we're flushing
Especially don't even try to send stream-start event or try to negotiate. https://bugzilla.gnome.org/show_bug.cgi?id=704100
This commit is contained in:
parent
717ad20912
commit
d60c2c2864
1 changed files with 13 additions and 1 deletions
|
@ -2573,8 +2573,20 @@ gst_base_src_loop (GstPad * pad)
|
|||
|
||||
src = GST_BASE_SRC (GST_OBJECT_PARENT (pad));
|
||||
|
||||
/* Just leave immediately if we're flushing */
|
||||
GST_LIVE_LOCK (src);
|
||||
if (G_UNLIKELY (src->priv->flushing || GST_PAD_IS_FLUSHING (pad)))
|
||||
goto flushing;
|
||||
GST_LIVE_UNLOCK (src);
|
||||
|
||||
gst_base_src_send_stream_start (src);
|
||||
|
||||
/* The stream-start event could've caused something to flush us */
|
||||
GST_LIVE_LOCK (src);
|
||||
if (G_UNLIKELY (src->priv->flushing || GST_PAD_IS_FLUSHING (pad)))
|
||||
goto flushing;
|
||||
GST_LIVE_UNLOCK (src);
|
||||
|
||||
/* check if we need to renegotiate */
|
||||
if (gst_pad_check_reconfigure (pad)) {
|
||||
if (!gst_base_src_negotiate (src)) {
|
||||
|
@ -2588,7 +2600,7 @@ gst_base_src_loop (GstPad * pad)
|
|||
|
||||
GST_LIVE_LOCK (src);
|
||||
|
||||
if (G_UNLIKELY (src->priv->flushing))
|
||||
if (G_UNLIKELY (src->priv->flushing || GST_PAD_IS_FLUSHING (pad)))
|
||||
goto flushing;
|
||||
|
||||
blocksize = src->blocksize;
|
||||
|
|
Loading…
Reference in a new issue