decodebin2: Only call autoplug-continue with fixed caps

With unfixed caps we can't reliably decide if the final caps
are going to be "raw" (e.g. supported by a sink) or not.

We will get here again later when the caps are fixed.
This commit is contained in:
Sebastian Dröge 2011-09-20 14:03:47 +02:00
parent 7e1e169b1b
commit 8e114c427a

View file

@ -1423,10 +1423,17 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
dpad = gst_decode_pad_new (dbin, pad, chain); dpad = gst_decode_pad_new (dbin, pad, chain);
/* 1. Emit 'autoplug-continue' the result will tell us if this pads needs /* 1. Emit 'autoplug-continue' the result will tell us if this pads needs
* further autoplugging. */ * further autoplugging. Only do this for fixed caps, for unfixed caps
g_signal_emit (G_OBJECT (dbin), * we will later come here again from the notify::caps handler. The
gst_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE], 0, dpad, caps, * problem with unfixed caps is that we can reliably tell if the output
&apcontinue); * is e.g. accepted by a sink because only parts of the possible final
* caps might be accepted by the sink. */
if (gst_caps_is_fixed (caps))
g_signal_emit (G_OBJECT (dbin),
gst_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE], 0, dpad, caps,
&apcontinue);
else
apcontinue = TRUE;
/* 1.a if autoplug-continue is FALSE or caps is a raw format, goto pad_is_final */ /* 1.a if autoplug-continue is FALSE or caps is a raw format, goto pad_is_final */
if ((!apcontinue) || are_final_caps (dbin, caps)) if ((!apcontinue) || are_final_caps (dbin, caps))