From bd15e5275b4fe5868416ffdcffa1de56c7c71f77 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Fri, 27 Oct 2023 16:29:26 +0200 Subject: [PATCH] pipewiresink: copy metadata into pipewirepool buffers If the pipewiresink needs to copy the GStreamer buffers to the PipeWire buffers, because the upstream element didn't use the pipewirepool, the metadata must be copied, too. Otherwise the pipewire datas will be filled with the metadata from the buffer during the initialization and not the currently used buffer. For example, without copying the metadata the buffer timestamp will be missing on the pipewire buffers. --- src/gst/gstpipewiresink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c index 03d9af7ee..b20bf469a 100644 --- a/src/gst/gstpipewiresink.c +++ b/src/gst/gstpipewiresink.c @@ -703,6 +703,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer) gst_buffer_extract (buffer, 0, info.data, info.maxsize); gst_buffer_unmap (b, &info); gst_buffer_resize (b, 0, gst_buffer_get_size (buffer)); + gst_buffer_copy_into(b, buffer, GST_BUFFER_COPY_METADATA, 0, -1); buffer = b; unref_buffer = TRUE;