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.
This commit is contained in:
Sebastian Dröge 2014-07-10 12:50:17 +02:00
parent 83d508a552
commit 994680b04e

View file

@ -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;
}