decodebin2: Prune old groups before switching to the new one
authorYouness Alaoui <youness.alaoui@collabora.co.uk>
Tue, 13 Sep 2011 23:14:10 +0000 (23:14 +0000)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 19 Jan 2012 08:04:52 +0000 (09:04 +0100)
commite2a038acee2969ed0b558093fa1c8b7422073e40
tree012f8ee148e43fc8f1a9465d598d8a30ce31e5b4
parent3e312e6e162638d8e07f0edb3859980dabb089da
decodebin2: Prune old groups before switching to the new one

In order to allow for proper functionality when a decoder only supports
one instance at a time (dsp), we must block the demuxer pads when they
get created if they are not part of the active group, preventing buffers
from being sent to the decoder (and initializing it through setcaps),
then after we switch to a new group, we unblock the demuxer pads for
the active groups. In the callback for the unblock, we prune the old
groups, making sure the previous decoder instance is destroyed before
we push a buffer to the new instance.
gst/playback/gstdecodebin2.c