mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
basetransform: simplify code
We already checked passthrough a few lines above.
This commit is contained in:
parent
d8c12ceb2b
commit
3075b3c529
1 changed files with 19 additions and 24 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue