gst: use gst_buffer_get_size() to get the buffer size

_get_sizes() contains the padding and we don't want to copy that.
This commit is contained in:
Wim Taymans 2025-01-17 12:19:07 +01:00
parent 86e7429039
commit c81910a51c

View file

@ -861,8 +861,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
if (buffer->pool != GST_BUFFER_POOL_CAST (pwsink->stream->pool)) {
gsize offset = 0;
gsize buf_size = 0;
gst_buffer_get_sizes (buffer, NULL, &buf_size);
gsize buf_size = gst_buffer_get_size (buffer);
/* For some streams, the buffer size is changed and may exceed the acquired
* buffer size which is acquired from the pool of pipewiresink. Need split