mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
pipewiresink: use all the available dest memory when copying buffer
When pipewiresink needs to copy data, it has to resize the destination buffer (to a smaller size) in order to send the correct data size to pipewire. When this dest buffer is reused later, it will still have this smaller size as its total size and the copy may discard data from upstream if the new upstream buffer is bigger than the last one that was copied on the same dest buffer.
This commit is contained in:
parent
0999f3cf93
commit
b86e5cabfa
|
@ -616,7 +616,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
goto done;
|
||||
|
||||
gst_buffer_map (b, &info, GST_MAP_WRITE);
|
||||
gst_buffer_extract (buffer, 0, info.data, info.size);
|
||||
gst_buffer_extract (buffer, 0, info.data, info.maxsize);
|
||||
gst_buffer_unmap (b, &info);
|
||||
gst_buffer_resize (b, 0, gst_buffer_get_size (buffer));
|
||||
buffer = b;
|
||||
|
|
Loading…
Reference in a new issue