diff --git a/srcpkgs/chromium/patches/chromium-84-mediaalloc.patch b/srcpkgs/chromium/patches/chromium-84-mediaalloc.patch new file mode 100644 index 00000000000..09b52191f4a --- /dev/null +++ b/srcpkgs/chromium/patches/chromium-84-mediaalloc.patch @@ -0,0 +1,41 @@ +https://bugs.chromium.org/p/chromium/issues/detail?id=1095962 + +--- media/base/media.cc ++++ media/base/media.cc +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include ++ + #include "media/base/media.h" + + #include "base/allocator/buildflags.h" +@@ -41,7 +43,7 @@ + + #if BUILDFLAG(USE_ALLOCATOR_SHIM) + // Remove allocation limit from ffmpeg, so calls go down to shim layer. +- av_max_alloc(0); ++ av_max_alloc(std::numeric_limits::max()); + #endif // BUILDFLAG(USE_ALLOCATOR_SHIM) + + #endif // BUILDFLAG(ENABLE_FFMPEG) +--- third_party/ffmpeg/chromium/dllmain.cc ++++ third_party/ffmpeg/chromium/dllmain.cc +@@ -3,6 +3,7 @@ + // found in the LICENSE file. + + #include ++#include + #include + #include + #include +@@ -28,7 +29,7 @@ + if (reason == DLL_PROCESS_ATTACH) { + DisableThreadLibraryCalls(instance); + // Remove allocation limit from ffmpeg, so calls go down to shim layer. +- av_max_alloc(0); ++ av_max_alloc(std::numeric_limits::max()); + // Enable OOM crashes in the shim for all malloc calls that fail. + _set_new_mode(1); + _set_new_handler(&OnNoMemory); diff --git a/srcpkgs/chromium/patches/chromium-fix-vaapi-on-intel.patch b/srcpkgs/chromium/patches/chromium-fix-vaapi-on-intel.patch new file mode 100644 index 00000000000..e01a6a97ef0 --- /dev/null +++ b/srcpkgs/chromium/patches/chromium-fix-vaapi-on-intel.patch @@ -0,0 +1,40 @@ +From 9ff06536caf7ea51aad9fd2bb649c858eaf7ee84 Mon Sep 17 00:00:00 2001 +From: Akarshan Biswas +Date: Sat, 26 Oct 2019 10:06:30 +0530 +Subject: [PATCH] Move offending function to chromeos only + +--- media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -66,6 +66,7 @@ void ReportToUMA(VAVDADecoderFailure fai + VAVDA_DECODER_FAILURES_MAX + 1); + } + ++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) + // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby + // Lake) Cpu platform id's are referenced from the following file in kernel + // source arch/x86/include/asm/intel-family.h +@@ -78,6 +79,7 @@ bool IsGeminiLakeOrLater() { + cpuid.model() >= kGeminiLakeModelId; + return is_geminilake_or_later; + } ++#endif + + } // namespace + +@@ -1155,6 +1157,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe + if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) + return BufferAllocationMode::kNormal; + ++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) ++ // Move this to chromeOs only as it is causing problem in some intel linux drivers + // On Gemini Lake, Kaby Lake and later we can pass to libva the client's + // PictureBuffers to decode onto, which skips the use of the Vpp unit and its + // associated format reconciliation copy, avoiding all internal buffer +@@ -1171,6 +1175,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe + num_extra_pics_ = 3; + return BufferAllocationMode::kNone; + } ++#endif + + // If we're here, we have to use the Vpp unit and allocate buffers for + // |decoder_|; usually we'd have to allocate the |decoder_|s diff --git a/srcpkgs/chromium/patches/upstream-force-mp3-files-to-have-a-start-time-of-zero.patch b/srcpkgs/chromium/patches/upstream-force-mp3-files-to-have-a-start-time-of-zero.patch new file mode 100644 index 00000000000..7fc433fab8f --- /dev/null +++ b/srcpkgs/chromium/patches/upstream-force-mp3-files-to-have-a-start-time-of-zero.patch @@ -0,0 +1,38 @@ +From 192fc3899f76e9487d77895f31df8d2d13bf9619 Mon Sep 17 00:00:00 2001 +From: Dale Curtis +Date: Fri, 26 Jun 2020 01:10:55 +0000 +Subject: [PATCH] Force mp3 files to have a start time of zero. + +This will allow us to remove our custom patch which breaks upstream +ffmpeg functionality for unknown reasons. + +R=sandersd + +Fixed: 1062037 +Change-Id: I253011843dee4dd6a8c958b14990ad836a9f1dca +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2268221 +Auto-Submit: Dale Curtis +Reviewed-by: Dan Sanders +Commit-Queue: Dale Curtis +Cr-Commit-Position: refs/heads/master@{#782792} +--- + media/filters/ffmpeg_demuxer.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc +index 01266e1a072..a7ed542b5fc 100644 +--- media/filters/ffmpeg_demuxer.cc ++++ media/filters/ffmpeg_demuxer.cc +@@ -1522,6 +1522,12 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) { + if (glue_->container() == container_names::CONTAINER_AVI) + format_context->flags |= AVFMT_FLAG_GENPTS; + ++ // FFmpeg will incorrectly adjust the start time of MP3 files into the future ++ // based on discard samples. We were unable to fix this upstream without ++ // breaking ffmpeg functionality. https://crbug.com/1062037 ++ if (glue_->container() == container_names::CONTAINER_MP3) ++ start_time_ = base::TimeDelta(); ++ + // For testing purposes, don't overwrite the timeline offset if set already. + if (timeline_offset_.is_null()) { + timeline_offset_ = diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index a7fed941ee1..5295224da83 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -1,15 +1,15 @@ # Template file for 'chromium' pkgname=chromium # See http://www.chromium.org/developers/calendar for the latest version -version=83.0.4103.106 -revision=2 +version=83.0.4103.116 +revision=1 archs="i686 x86_64*" short_desc="Google's attempt at creating a safer, faster, and more stable browser" maintainer="Enno Boland " license="BSD-3-Clause" homepage="https://www.chromium.org/" distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz" -checksum=cfd153a2e10b0bb0fb3b7e6be543aef0915181f5fbdbea893d08465afd097e2f +checksum=bb0c7e8dfee9f3a5e30eca7f34fc9f21caefa82a86c058c552f52b1ae2da2ac3 lib32disabled=yes nodebug=yes @@ -36,7 +36,7 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel ffmpeg-devel libva-devel python-setuptools $(vopt_if sndio sndio-devel)" depends="libexif hwids desktop-file-utils hicolor-icon-theme xdg-utils" -build_options_default="clang pulseaudio" +build_options_default="clang pulseaudio vaapi" case "${XBPS_TARGET_MACHINE}" in x86_64|i686) build_options_default+=" js_optimize" ;;