summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-02-11 14:13:55 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-05-26 19:50:23 +0000
commitfc722f8aea13246ce7779acbb3a59681b64131a6 (patch)
treef0ca74bffa3ed887affd3731bf1e57f6ceca614e /meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
parentb81c6beb388cafa6de9ca1baa13c3d529ca2f2d8 (diff)
meta-pipewire: backport pipewire updates from master
Bug-AGL: SPEC-3844 Bug-AGL: SPEC-3900 Bug-AGL: SPEC-3909 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Change-Id: I3c32d0083f31f94b49e33c3dd546515d39df7867 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26360 Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch')
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
new file mode 100644
index 000000000..a3bde14bc
--- /dev/null
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-pipewiresink-use-all-the-available-dest-memory-when-.patch
@@ -0,0 +1,33 @@
+From b86e5cabfae3ab354f350f8f7589b21a153a8a5d Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Mon, 10 May 2021 17:12:12 +0300
+Subject: 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.
+
+Upstream-Status: Backport [from master/0.3.28]
+---
+ src/gst/gstpipewiresink.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c
+index 966b12c7..031b3ae0 100644
+--- a/src/gst/gstpipewiresink.c
++++ b/src/gst/gstpipewiresink.c
+@@ -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;
+--
+2.30.2
+