From f149c27a619a5c77f8da39c1baf45c1a6c2605db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 21 Feb 2014 09:43:38 +0100 Subject: [PATCH] decodebin: Also make sure to not duplicate an element factory after a group If we are using an adaptive stream demuxer, which outputs a non-container stream, we are putting another multiqueue after the *parser* following the adaptive stream demuxer. We do not want to add another instance of the same parser right after this multiqueue. --- gst/playback/gstdecodebin2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 3906b790d2..0f655d8bca 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1993,6 +1993,15 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, break; } } + + if (!skip && chain->parent && chain->parent->parent) { + GstDecodeChain *parent_chain = chain->parent->parent; + GstDecodeElement *pelem = + parent_chain->elements ? parent_chain->elements->data : NULL; + + if (pelem && gst_element_get_factory (pelem->element) == factory) + skip = TRUE; + } CHAIN_MUTEX_UNLOCK (chain); if (skip) { GST_DEBUG_OBJECT (dbin,