Commit 9bd6fe41 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

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
parent bf7cd0ed
......@@ -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;
......
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