basetransform: simplify code

We already checked passthrough a few lines above.
This commit is contained in:
Wim Taymans 2012-02-02 12:30:14 +01:00
parent d8c12ceb2b
commit 3075b3c529

View file

@ -1433,18 +1433,14 @@ default_prepare_output_buffer (GstBaseTransform * trans,
GST_DEBUG_OBJECT (trans, "using pool alloc");
ret = gst_buffer_pool_acquire_buffer (priv->pool, outbuf, NULL);
} else {
gboolean want_in_place;
gsize insize, outsize;
gboolean res;
/* no pool, we need to figure out the size of the output buffer first */
insize = gst_buffer_get_size (inbuf);
if (trans->passthrough) {
GST_DEBUG_OBJECT (trans, "doing passthrough alloc");
/* passthrough, the output size is the same as the input size. */
outsize = insize;
} else {
gboolean want_in_place = (bclass->transform_ip != NULL)
want_in_place = (bclass->transform_ip != NULL)
&& trans->always_in_place;
if (want_in_place) {
@ -1469,7 +1465,6 @@ default_prepare_output_buffer (GstBaseTransform * trans,
if (!res)
goto unknown_size;
}
}
GST_DEBUG_OBJECT (trans, "doing alloc of size %" G_GSIZE_FORMAT, outsize);
*outbuf =
gst_buffer_new_allocate (priv->allocator, outsize, priv->alignment);