From 70b38dd9375f747bd8a9218c14a00631553ba792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 26 May 2014 14:23:13 +0200 Subject: [PATCH] basetransform: Passthrough ALLOCATION queries in passthrough mode even if we had no caps yet Or if the element does not care about caps at all. Also remove an assigned but unused local variable. https://bugzilla.gnome.org/show_bug.cgi?id=710268 --- libs/gst/base/gstbasetransform.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index f82a9b8fec..a7e493f5ba 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1457,16 +1457,15 @@ gst_base_transform_default_query (GstBaseTransform * trans, case GST_QUERY_ALLOCATION: { GstQuery *decide_query = NULL; - gboolean negotiated; /* can only be done on the sinkpad */ if (direction != GST_PAD_SINK) goto done; GST_OBJECT_LOCK (trans); - if (G_UNLIKELY (!(negotiated = priv->negotiated))) { + if (!priv->negotiated && !priv->passthrough && (klass->set_caps != NULL)) { GST_DEBUG_OBJECT (trans, - "not negotiated yet, can't answer ALLOCATION query"); + "not negotiated yet but need negotiation, can't answer ALLOCATION query"); GST_OBJECT_UNLOCK (trans); goto done; }