mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
basetransform: copy metadata when using a pool
also copy the metadata when we allocated a new buffer from a pool
This commit is contained in:
parent
7b16febb0d
commit
810e67900b
1 changed files with 2 additions and 1 deletions
|
@ -1447,7 +1447,7 @@ default_prepare_output_buffer (GstBaseTransform * trans,
|
|||
if (priv->pool) {
|
||||
GST_DEBUG_OBJECT (trans, "using pool alloc");
|
||||
ret = gst_buffer_pool_acquire_buffer (priv->pool, outbuf, NULL);
|
||||
goto done;
|
||||
goto copy_meta;
|
||||
}
|
||||
|
||||
/* no pool, we need to figure out the size of the output buffer first */
|
||||
|
@ -1483,6 +1483,7 @@ default_prepare_output_buffer (GstBaseTransform * trans,
|
|||
GST_DEBUG_OBJECT (trans, "doing alloc of size %" G_GSIZE_FORMAT, outsize);
|
||||
*outbuf = gst_buffer_new_allocate (priv->allocator, outsize, priv->alignment);
|
||||
|
||||
copy_meta:
|
||||
/* copy the metadata */
|
||||
if (bclass->copy_metadata)
|
||||
if (!bclass->copy_metadata (trans, inbuf, *outbuf)) {
|
||||
|
|
Loading…
Reference in a new issue