Date: Friday, April 1, 2022 @ 19:20:08 Author: foutrelis Revision: 441194
upgpkg: chromium 100.0.4896.60-2: fix desktop capture on wayland https://bugs.archlinux.org/task/74289 https://bugs.chromium.org/p/chromium/issues/detail?id=1311437 Added: chromium/trunk/webrtc-check-existence-of-cursor-metadata.patch Modified: chromium/trunk/PKGBUILD -------------------------------------------------+ PKGBUILD | 5 ++- webrtc-check-existence-of-cursor-metadata.patch | 31 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-04-01 19:09:57 UTC (rev 441193) +++ PKGBUILD 2022-04-01 19:20:08 UTC (rev 441194) @@ -5,7 +5,7 @@ pkgname=chromium pkgver=100.0.4896.60 -pkgrel=1 +pkgrel=2 _launcher_ver=8 _gcc_patchset=4 pkgdesc="A web browser built for speed, simplicity, and security" @@ -26,6 +26,7 @@ https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz webcodecs-stop-using-AudioOpusEncoder.patch + webrtc-check-existence-of-cursor-metadata.patch sql-make-VirtualCursor-standard-layout-type.patch use-oauth2-client-switches-as-default.patch) sha256sums=('0e5ea5f3061ad090cf6bd57ca037496d95ea8956de021aff902f7d0ded7bffdc' @@ -32,6 +33,7 @@ '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' 'a6120e7d4eb5e131b87b6ab3b922e0c6cd78e15501e54cfb2019875173688d80' '064daaa2b9d95b96ec04d8ddebf4af441f92263d123365b58fe73966866080af' + '88b2c8d9c6c1917f6632453f18aad7a3fd94d605eecb6c77ae2394ac5856ba95' 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a' 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711') @@ -90,6 +92,7 @@ # Upstream fixes patch -Np1 -i ../webcodecs-stop-using-AudioOpusEncoder.patch + patch -Np1 -d third_party/webrtc <../webrtc-check-existence-of-cursor-metadata.patch # https://chromium-review.googlesource.com/c/chromium/src/+/2862724 patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch Added: webrtc-check-existence-of-cursor-metadata.patch =================================================================== --- webrtc-check-existence-of-cursor-metadata.patch (rev 0) +++ webrtc-check-existence-of-cursor-metadata.patch 2022-04-01 19:20:08 UTC (rev 441194) @@ -0,0 +1,31 @@ +From c2cd814cdd8cbf8dda6ccec2266327a5321fbde8 Mon Sep 17 00:00:00 2001 +From: Jan Grulich <gru...@gmail.com> +Date: Tue, 15 Mar 2022 14:31:55 +0100 +Subject: [PATCH] PipeWire capturer: check existence of cursor metadata + +Check whether there are any cursor metadata before we try to validate +and use them, otherwise we might crash on this. + +Bug: webrtc:13429 +Change-Id: I365da59a189b6b974cebafc94fec49d5b942efae +Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255601 +Reviewed-by: Alexander Cooper <alcoo...@chromium.org> +Commit-Queue: Alexander Cooper <alcoo...@chromium.org> +Cr-Commit-Position: refs/heads/main@{#36240} +--- + .../desktop_capture/linux/wayland/shared_screencast_stream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index a8c86e26..9e81df4c 100644 +--- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -650,7 +650,7 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + const struct spa_meta_cursor* cursor = + static_cast<struct spa_meta_cursor*>(spa_buffer_find_meta_data( + spa_buffer, SPA_META_Cursor, sizeof(*cursor))); +- if (spa_meta_cursor_is_valid(cursor)) { ++ if (cursor && spa_meta_cursor_is_valid(cursor)) { + struct spa_meta_bitmap* bitmap = nullptr; + + if (cursor->bitmap_offset)