va: vpp: copy input buffer flags and timestamps
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 2 Feb 2021 15:22:34 +0000 (16:22 +0100)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 5 Feb 2021 17:54:25 +0000 (18:54 +0100)
Strictly speaking right now it's not required do this copy, but let's play safe
and assume in the future this metadata might be required while doing the
postprocessing.

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

sys/va/gstvavpp.c

index 5d47947..e5fc224 100644 (file)
@@ -1052,6 +1052,11 @@ gst_va_vpp_import_input_buffer (GstVaVpp * self, GstBuffer * inbuf,
   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;
+
   *buf = buffer;
 
   return GST_FLOW_OK;