/* find a pool for the negotiated caps now */
query = gst_query_new_allocation (outcaps, TRUE);
- if (gst_pad_peer_query (trans->srcpad, query))
+ if (!gst_pad_peer_query (trans->srcpad, query))
goto query_failed;
/* we got configuration from our peer, parse them */
ret = klass->set_caps (trans, in, out);
}
- if (ret) {
- /* try to get a pool when needed */
- gst_base_transform_do_bufferpool (trans, out);
- }
-
trans->negotiated = ret;
return ret;
}
}
+ if (ret) {
+ /* try to get a pool when needed */
+ gst_base_transform_do_bufferpool (trans, othercaps);
+ }
+
done:
if (otherpeer)
gst_object_unref (otherpeer);
goto done;
GST_BASE_TRANSFORM_LOCK (trans);
- passthrough = trans->passthrough;
+ passthrough = trans->passthrough || trans->always_in_place;
GST_BASE_TRANSFORM_UNLOCK (trans);
+ GST_DEBUG_OBJECT (trans, "passthrough %d", passthrough);
+
if (passthrough)
ret = gst_pad_peer_query (otherpad, query);
else
if (*out_buf == NULL) {
if (trans->passthrough) {
- GST_DEBUG_OBJECT (trans, "Avoiding pad alloc");
+ GST_DEBUG_OBJECT (trans, "Reusing input buffer");
*out_buf = in_buf;
} else if (trans->priv->srcpool) {
GST_DEBUG_OBJECT (trans, "using pool alloc");