Remove Raspberry Pi 3 support
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / pipewire / pipewire / 0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
1 From b86e5cabfae3ab354f350f8f7589b21a153a8a5d Mon Sep 17 00:00:00 2001
2 From: George Kiagiadakis <george.kiagiadakis@collabora.com>
3 Date: Mon, 10 May 2021 17:12:12 +0300
4 Subject: pipewiresink: use all the available dest memory when copying buffer
5
6 When pipewiresink needs to copy data, it has to resize the destination
7 buffer (to a smaller size) in order to send the correct data size to
8 pipewire. When this dest buffer is reused later, it will still have
9 this smaller size as its total size and the copy may discard data
10 from upstream if the new upstream buffer is bigger than the last one
11 that was copied on the same dest buffer.
12
13 Upstream-Status: Backport [from master/0.3.28]
14 ---
15  src/gst/gstpipewiresink.c | 2 +-
16  1 file changed, 1 insertion(+), 1 deletion(-)
17
18 diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c
19 index 966b12c7..031b3ae0 100644
20 --- a/src/gst/gstpipewiresink.c
21 +++ b/src/gst/gstpipewiresink.c
22 @@ -616,7 +616,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
23        goto done;
24  
25      gst_buffer_map (b, &info, GST_MAP_WRITE);
26 -    gst_buffer_extract (buffer, 0, info.data, info.size);
27 +    gst_buffer_extract (buffer, 0, info.data, info.maxsize);
28      gst_buffer_unmap (b, &info);
29      gst_buffer_resize (b, 0, gst_buffer_get_size (buffer));
30      buffer = b;
31 -- 
32 2.30.2
33