From 994680b04eb390a116a9b5bda2abd647df233be3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 10 Jul 2014 12:50:17 +0200 Subject: [PATCH] decodebin: Only link elements further after setting them to PAUSED They might fail to go to PAUSED, and when connecting them further we might already expose their srcpads on decodebin if we're unlucky. This prevents us to handle failures going to PAUSED gracefully. --- gst/playback/gstdecodebin2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 788b481..882ef54 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -2203,9 +2203,6 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, } } - /* link this element further */ - connect_element (dbin, delem, chain); - /* try to configure the subtitle encoding property when we can */ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), "subtitle-encoding"); @@ -2302,6 +2299,9 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, SUBTITLE_UNLOCK (dbin); } + /* link this element further */ + connect_element (dbin, delem, chain); + res = TRUE; break; } -- 2.7.4