summaryrefslogtreecommitdiff
path: root/gst/playback/gstdecodebin3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/playback/gstdecodebin3.c')
-rw-r--r--gst/playback/gstdecodebin3.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/playback/gstdecodebin3.c b/gst/playback/gstdecodebin3.c
index b93290357..dc7e217f2 100644
--- a/gst/playback/gstdecodebin3.c
+++ b/gst/playback/gstdecodebin3.c
@@ -2284,6 +2284,15 @@ reconfigure_output_stream (DecodebinOutputStream * output,
gst_bin_remove ((GstBin *) dbin, output->decoder);
output->decoder = NULL;
output->decoder_latency = GST_CLOCK_TIME_NONE;
+ } else if (output->linked) {
+ /* Otherwise if we have no decoder yet but the output is linked make
+ * sure that the ghost pad is really unlinked in case no decoder was
+ * needed previously */
+ if (!gst_ghost_pad_set_target ((GstGhostPad *) output->src_pad, NULL)) {
+ GST_ERROR_OBJECT (dbin, "Could not release ghost pad");
+ gst_caps_unref (new_caps);
+ goto cleanup;
+ }
}
gst_caps_unref (new_caps);