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>
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;