mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
decodebin: early out on pad-added when the pad is inactive
The pad may be recently deactivated if the element is switched back down very quickly. https://bugzilla.gnome.org/show_bug.cgi?id=752651
This commit is contained in:
parent
ee44337fc3
commit
870c6df489
1 changed files with 7 additions and 0 deletions
|
@ -2880,6 +2880,12 @@ pad_added_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
|||
dbin = chain->dbin;
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "pad added, chain:%p", chain);
|
||||
GST_PAD_STREAM_LOCK (pad);
|
||||
if (!gst_pad_is_active (pad)) {
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
GST_DEBUG_OBJECT (pad, "Ignoring pad-added from a deactivated pad");
|
||||
return;
|
||||
}
|
||||
|
||||
caps = get_pad_caps (pad);
|
||||
if (analyze_new_pad (dbin, element, pad, caps, chain, &new_chain))
|
||||
|
@ -2900,6 +2906,7 @@ pad_added_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
|||
GST_DEBUG_OBJECT (dbin, "No decode chain, new pad ignored");
|
||||
}
|
||||
EXPOSE_UNLOCK (dbin);
|
||||
GST_PAD_STREAM_UNLOCK (pad);
|
||||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
|
|
Loading…
Reference in a new issue