diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index e221322ad0..be27a6cc45 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -1633,7 +1633,6 @@ gst_decodebin3_input_pad_link (GstPad * pad, GstObject * parent, GstPad * peer) GstDecodebin3 *dbin = (GstDecodebin3 *) parent; GstQuery *query; gboolean pull_mode = FALSE; - gboolean has_caps = TRUE; GstPadLinkReturn res = GST_PAD_LINK_OK; DecodebinInput *input = g_object_get_data (G_OBJECT (pad), "decodebin.input"); @@ -1650,26 +1649,12 @@ gst_decodebin3_input_pad_link (GstPad * pad, GstObject * parent, GstPad * peer) GST_DEBUG_OBJECT (dbin, "Upstream can do pull-based : %d", pull_mode); - if (!pull_mode) { - /* If push-based, query if it will provide some caps */ - query = gst_query_new_caps (NULL); - if (gst_pad_query (peer, query)) { - GstCaps *rescaps = NULL; - gst_query_parse_caps_result (query, &rescaps); - if (!rescaps || gst_caps_is_any (rescaps) || gst_caps_is_empty (rescaps)) { - GST_DEBUG_OBJECT (dbin, "Upstream can't provide caps"); - has_caps = FALSE; - } - } - gst_query_unref (query); - } - - /* If upstream *can* do pull-based OR it doesn't have any caps, we always use - * a parsebin. If not, we will delay that decision to a later stage - * (caps/stream/collection event processing) to figure out if one is really - * needed or whether an identity element will be enough */ + /* If upstream *can* do pull-based we always use a parsebin. If not, we will + * delay that decision to a later stage (caps/stream/collection event + * processing) to figure out if one is really needed or whether an identity + * element will be enough */ INPUT_LOCK (dbin); - if (pull_mode || !has_caps) { + if (pull_mode) { if (!gst_decodebin_input_ensure_parsebin (input)) res = GST_PAD_LINK_REFUSED; else if (input->identity) {