From 27058c1bc69ae1fd6413f85e29da845d31691116 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Thu, 18 Aug 2011 15:13:23 +0000 Subject: [PATCH] decodebin2: Initialize variable correctly If subdrained isn't initialized to FALSE then a chain might think that its group is drained when in fact it's not and this can cause a switch too early or even cause a deadlock. --- gst/playback/gstdecodebin2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 741c45dcf6..158d6e6f22 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -3078,7 +3078,7 @@ drain_and_switch_group (GstDecodeGroup * group, GstDecodePad * drainpad, * new information */ for (tmp = group->children; tmp; tmp = tmp->next) { GstDecodeChain *chain = (GstDecodeChain *) tmp->data; - gboolean subdrained; + gboolean subdrained = FALSE; handled |= drain_and_switch_chains (chain, drainpad, last_group, &subdrained,