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.
This commit is contained in:
Michael Tretter 2023-10-27 16:29:26 +02:00
parent 9a72766ae8
commit bd15e5275b

View file

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