decodebin2: Chains with an exposed endpad are complete too

This allows partial group changes, i.e. demuxer2 in the example below
goes EOS but has a next group and audio2 stays the same.

          /-- >demuxer2---->video
demuxer---             \--->audio1
          \--->audio2
This commit is contained in:
Sebastian Dröge 2009-09-26 12:56:36 +02:00
parent bf7cd0ed81
commit 9bd6fe41cb

View file

@ -2191,7 +2191,7 @@ out:
*
* Returns TRUE if the chain is complete, this means either
* a) This chain is a dead end, i.e. we have no suitable plugins
* b) This chain ends in an endpad and this is blocked
* b) This chain ends in an endpad and this is blocked or exposed
*
* Not MT-safe, always call with decodebin expose lock
*/
@ -2200,7 +2200,12 @@ gst_decode_chain_is_complete (GstDecodeChain * chain)
{
gboolean complete = FALSE;
if (chain->deadend || (chain->endpad && chain->endpad->blocked)) {
if (chain->deadend) {
complete = TRUE;
goto out;
}
if (chain->endpad && (chain->endpad->blocked || chain->endpad->exposed)) {
complete = TRUE;
goto out;
}
@ -2543,7 +2548,7 @@ gst_decode_chain_expose (GstDecodeChain * chain, GList ** endpads)
return TRUE;
if (chain->endpad) {
if (!chain->endpad->blocked)
if (!chain->endpad->blocked && !chain->endpad->exposed)
return FALSE;
*endpads = g_list_prepend (*endpads, gst_object_ref (chain->endpad));
return TRUE;