Commit 870c6df4 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h

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.
parent ee44337f
......@@ -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);
if (!gst_pad_is_active (pad)) {
GST_DEBUG_OBJECT (pad, "Ignoring pad-added from a deactivated pad");
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");
static GstPadProbeReturn
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment