decodebin2: Fix group switching algorithm
authorDavid Corvoysier <david.corvoysier@orange.com>
Thu, 11 Oct 2012 09:36:54 +0000 (11:36 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 14 Oct 2012 08:58:18 +0000 (10:58 +0200)
commit87fd43aaaaf014397eb13f0af06a9697d3c7b57d
treecd730b85e1a9d03a7766202930855674fb62d7b8
parent336842d35cf7e5d68c7f71d961d1fff8c19d49e9
decodebin2: Fix group switching algorithm

There were two issues with the previous decodebin2 group switching algorithm:

Issue 1: It operated with no memory of what has been drained or not, leading to
multiple checks for chains/groups that were already drained.

Issue 2: When receiving an EOS, it only detected that a higher-level chain
was drained if it contained the pad receiving the EOS.

The following modifications have been applied:
- a new drained property has been added to GstDecodeChain
- both drained properties of chain/group are set as soon as they are detected
- the algorithm now tests agains these values

See https://bugzilla.gnome.org/show_bug.cgi?id=685938
gst/playback/gstdecodebin2.c