va: basetransform: Use copy_metadata() at buffer import.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Mon, 23 Aug 2021 16:44:30 +0000 (18:44 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 10 Sep 2021 08:52:13 +0000 (10:52 +0200)
Instead of using only gst_buffer_copy_into() use copy_metadata()
vmethod to copy what's needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2495>

sys/va/gstvabasetransform.c

index 6d6ea97..16a039d 100644 (file)
@@ -787,10 +787,10 @@ gst_va_base_transform_import_buffer (GstVaBaseTransform * self,
   if (!copied)
     goto invalid_buffer;
 
-  /* strictly speaking this is not needed but let's play safe */
-  if (!gst_buffer_copy_into (buffer, inbuf, GST_BUFFER_COPY_FLAGS |
-          GST_BUFFER_COPY_TIMESTAMPS, 0, -1))
-    return GST_FLOW_ERROR;
+  /* copy metadata, default implemenation of baseclass will copy everything
+   * what we need */
+  GST_BASE_TRANSFORM_CLASS (parent_class)->copy_metadata
+      (GST_BASE_TRANSFORM_CAST (self), inbuf, buffer);
 
   *buf = buffer;