Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package chromium for openSUSE:Factory checked in at 2022-05-28 22:15:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chromium (Old) and /work/SRC/openSUSE:Factory/.chromium.new.2254 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chromium" Sat May 28 22:15:06 2022 rev:337 rq:979532 version:102.0.5005.61 Changes: -------- --- /work/SRC/openSUSE:Factory/chromium/chromium.changes 2022-05-15 19:00:56.594447292 +0200 +++ /work/SRC/openSUSE:Factory/.chromium.new.2254/chromium.changes 2022-05-28 22:15:54.912910773 +0200 @@ -1,0 +2,44 @@ +Fri May 27 19:40:42 UTC 2022 - Callum Farmer <gm...@opensuse.org> + +- Chromium 102.0.5001.61 (boo#1199893) + * CVE-2022-1853: Use after free in Indexed DB + * CVE-2022-1854: Use after free in ANGLE + * CVE-2022-1855: Use after free in Messaging + * CVE-2022-1856: Use after free in User Education + * CVE-2022-1857: Insufficient policy enforcement in File System API + * CVE-2022-1858: Out of bounds read in DevTools + * CVE-2022-1859: Use after free in Performance Manager + * CVE-2022-1860: Use after free in UI Foundations + * CVE-2022-1861: Use after free in Sharing + * CVE-2022-1862: Inappropriate implementation in Extensions + * CVE-2022-1863: Use after free in Tab Groups + * CVE-2022-1864: Use after free in WebApp Installs + * CVE-2022-1865: Use after free in Bookmarks + * CVE-2022-1866: Use after free in Tablet Mode + * CVE-2022-1867: Insufficient validation of untrusted input in Data Transfer + * CVE-2022-1868: Inappropriate implementation in Extensions API + * CVE-2022-1869: Type Confusion in V8 + * CVE-2022-1870: Use after free in App Service + * CVE-2022-1871: Insufficient policy enforcement in File System API + * CVE-2022-1872: Insufficient policy enforcement in Extensions API + * CVE-2022-1873: Insufficient policy enforcement in COOP + * CVE-2022-1874: Insufficient policy enforcement in Safe Browsing + * CVE-2022-1875: Inappropriate implementation in PDF + * CVE-2022-1876: Heap buffer overflow in DevTools +- Added patches: + * chromium-102-compiler.patch + * chromium-102-fenced_frame_utils-include.patch + * chromium-102-regex_pattern-array.patch + * chromium-102-swiftshader-template-instantiation.patch + * chromium-102-symbolize-include.patch + * ffmpeg-new-channel-layout.patch +- Removed patches: + * chromium-100-compiler.patch + * chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch + * chromium-95-quiche-include.patch + * chromium-fix-swiftshader-template.patch + * chromium-missing-include-tuple.patch + * chromium-webrtc-stats-missing-vector.patch + * chromium-101-segmentation_platform-type.patch + +------------------------------------------------------------------- Old: ---- chromium-100-compiler.patch chromium-101-segmentation_platform-type.patch chromium-101.0.4951.67.tar.xz chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch chromium-95-quiche-include.patch chromium-fix-swiftshader-template.patch chromium-missing-include-tuple.patch chromium-webrtc-stats-missing-vector.patch New: ---- chromium-102-compiler.patch chromium-102-fenced_frame_utils-include.patch chromium-102-regex_pattern-array.patch chromium-102-swiftshader-template-instantiation.patch chromium-102-symbolize-include.patch chromium-102.0.5005.61.tar.xz ffmpeg-new-channel-layout.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chromium.spec ++++++ --- /var/tmp/diff_new_pack.lmDmpr/_old 2022-05-28 22:16:02.368925671 +0200 +++ /var/tmp/diff_new_pack.lmDmpr/_new 2022-05-28 22:16:02.372925679 +0200 @@ -49,7 +49,7 @@ # Chromium built with GCC 11 and LTO enabled crashes (boo#1194055) %bcond_with lto Name: chromium -Version: 101.0.4951.67 +Version: 102.0.5005.61 Release: 0 Summary: Google's open source browser project License: BSD-3-Clause AND LGPL-2.1-or-later @@ -57,6 +57,7 @@ Source0: https://commondatastorage.googleapis.com/chromium-browser-official/%{rname}-%{version}.tar.xz Source1: esbuild.tar.gz Source3: README.SUSE +Source4: ffmpeg-new-channel-layout.patch # Toolchain definitions Source30: master_preferences Source104: chromium-symbolic.svg @@ -83,8 +84,7 @@ Patch11: chromium-lp151-old-drm.patch # gentoo/fedora/arch patchset Patch12: chromium-78-protobuf-RepeatedPtrField-export.patch -Patch13: chromium-80-QuicStreamSendBuffer-deleted-move-constructor.patch -Patch15: chromium-100-compiler.patch +Patch15: chromium-102-compiler.patch Patch17: chromium-86-ImageMemoryBarrierData-init.patch Patch21: chromium-gcc11.patch Patch40: chromium-91-java-only-allowed-in-android-builds.patch @@ -95,21 +95,20 @@ Patch65: chromium-94-sql-no-assert.patch Patch68: chromium-94-ffmpeg-roll.patch Patch69: chromium-93-InkDropHost-crash.patch -Patch72: chromium-95-quiche-include.patch Patch78: chromium-98-EnumTable-crash.patch Patch80: chromium-97-ScrollView-reference.patch Patch84: chromium-third_party-symbolize-missing-include.patch -Patch85: chromium-fix-swiftshader-template.patch Patch86: chromium-97-arm-tflite-cast.patch Patch87: chromium-98-gtk4-build.patch Patch90: chromium-100-InMilliseconds-constexpr.patch -Patch93: chromium-missing-include-tuple.patch -Patch94: chromium-webrtc-stats-missing-vector.patch Patch95: chromium-101-libxml-unbundle.patch -Patch96: chromium-101-segmentation_platform-type.patch -Patch101: chromium-86-fix-vaapi-on-intel.patch +Patch97: chromium-102-fenced_frame_utils-include.patch +Patch98: chromium-102-regex_pattern-array.patch +Patch99: chromium-102-swiftshader-template-instantiation.patch +Patch100: chromium-102-symbolize-include.patch +Patch201: chromium-86-fix-vaapi-on-intel.patch # PATCH-FIX-SUSE: allow prop codecs to be set with chromium branding -Patch102: chromium-prop-codecs.patch +Patch202: chromium-prop-codecs.patch BuildRequires: SDL-devel BuildRequires: bison BuildRequires: cups-devel @@ -117,6 +116,7 @@ BuildRequires: elfutils BuildRequires: fdupes BuildRequires: flex +BuildRequires: git BuildRequires: gn >= 0.1807 BuildRequires: gperf BuildRequires: hicolor-icon-theme @@ -303,6 +303,7 @@ %if 0%{?suse_version} >= 1550 patch -R -p1 < %{PATCH68} %endif +patch -R -p1 < %{SOURCE4} %build # esbuild @@ -463,7 +464,6 @@ third_party/libx11/src third_party/libxcb-keysyms/keysyms third_party/libxml/chromium - third_party/libXNVCtrl third_party/libyuv third_party/libzip third_party/lottie @@ -482,7 +482,6 @@ third_party/node third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 third_party/one_euro_filter - third_party/opencv third_party/openscreen third_party/openscreen/src/third_party/mozilla third_party/openscreen/src/third_party/tinycbor/src/src @@ -527,13 +526,13 @@ third_party/swiftshader/third_party/llvm-subzero third_party/swiftshader/third_party/marl third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 + third_party/swiftshader/third_party/SPIRV-Tools third_party/swiftshader/third_party/subzero third_party/tensorflow-text third_party/tflite third_party/tflite/src/third_party/eigen3 third_party/tflite/src/third_party/fft2d third_party/ukey2 - third_party/usrsctp third_party/utf third_party/vulkan third_party/wayland ++++++ chromium-100-compiler.patch -> chromium-102-compiler.patch ++++++ --- /work/SRC/openSUSE:Factory/chromium/chromium-100-compiler.patch 2022-04-01 21:37:42.592441585 +0200 +++ /work/SRC/openSUSE:Factory/.chromium.new.2254/chromium-102-compiler.patch 2022-05-28 22:15:11.232823499 +0200 @@ -1,17 +1,17 @@ From 307a0f63dd9b118f4b8470ed3d7567e81fdb7a6d Mon Sep 17 00:00:00 2001 From: Mike Gilbert <flop...@gentoo.org> -Date: Thu, 3 Feb 2022 16:26:20 +0000 +Date: Fri, 22 Apr 2022 09:05:24 +0000 Subject: [PATCH] Disable various compiler configs --- - build/config/compiler/BUILD.gn | 105 ++++++--------------------------- - 1 file changed, 17 insertions(+), 88 deletions(-) + build/config/compiler/BUILD.gn | 114 +++++---------------------------- + 1 file changed, 17 insertions(+), 97 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 61ceb0d..7392018 100644 +index d40843b..b92f03b 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -291,9 +291,7 @@ config("compiler") { +@@ -286,9 +286,7 @@ config("compiler") { configs += [ # See the definitions below. @@ -21,7 +21,7 @@ ":compiler_codegen", ":compiler_deterministic", ] -@@ -534,31 +532,6 @@ config("compiler") { +@@ -522,31 +520,6 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } @@ -53,7 +53,7 @@ # Rust compiler setup (for either clang or rustc). if (enable_rust) { defines += [ "RUST_ENABLED" ] -@@ -1235,45 +1208,6 @@ config("compiler_deterministic") { +@@ -1232,45 +1205,6 @@ config("compiler_deterministic") { } } @@ -99,7 +99,23 @@ # Tells the compiler not to use absolute paths when passing the default # paths to the tools it invokes. We don't want this because we don't # really need it and it can mess up the goma cache entries. -@@ -1594,7 +1528,7 @@ config("chromium_code") { +@@ -1538,15 +1472,6 @@ config("default_warnings") { + cflags += [ "-Wno-deprecated-non-prototype" ] + } + +- if (!is_nacl && !(is_chromeos || +- default_toolchain == "//build/toolchain/cros:target")) { +- # TODO(https://crbug.com/1316298): Re-enable once test failure is figured out +- cflags += [ +- "-Xclang", +- "-no-opaque-pointers", +- ] +- } +- + if (is_fuchsia) { + # TODO(https://bugs.chromium.org/p/fuchsia/issues/detail?id=77383) + cflags += [ "-Wno-deprecated-copy" ] +@@ -1615,7 +1540,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { @@ -108,7 +124,7 @@ if (treat_warnings_as_errors) { cflags += [ "-Werror" ] -@@ -1603,10 +1537,6 @@ config("chromium_code") { +@@ -1624,10 +1549,6 @@ config("chromium_code") { # well. ldflags = [ "-Werror" ] } @@ -119,7 +135,7 @@ # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. -@@ -1615,15 +1545,6 @@ config("chromium_code") { +@@ -1636,15 +1557,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] @@ -135,7 +151,7 @@ if (is_mac) { cflags_objc = [ "-Wobjc-missing-property-synthesis" ] cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] -@@ -2026,7 +1947,8 @@ config("default_stack_frames") { +@@ -2035,7 +1947,8 @@ config("default_stack_frames") { } # Default "optimization on" config. @@ -145,7 +161,7 @@ if (is_win) { if (chrome_pgo_phase != 2) { # Favor size over speed, /O1 must be before the common flags. -@@ -2064,7 +1986,8 @@ config("optimize") { +@@ -2073,7 +1986,8 @@ config("optimize") { } # Turn off optimizations. @@ -155,7 +171,7 @@ if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2104,7 +2027,8 @@ config("no_optimize") { +@@ -2113,7 +2027,8 @@ config("no_optimize") { # Turns up the optimization level. On Windows, this implies whole program # optimization and link-time code generation which is very expensive and should # be used sparingly. @@ -165,7 +181,7 @@ if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2137,7 +2061,8 @@ config("optimize_max") { +@@ -2146,7 +2061,8 @@ config("optimize_max") { # # TODO(crbug.com/621335) - rework how all of these configs are related # so that we don't need this disclaimer. @@ -175,7 +191,7 @@ if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2163,7 +2088,8 @@ config("optimize_speed") { +@@ -2172,7 +2088,8 @@ config("optimize_speed") { } } @@ -185,7 +201,7 @@ cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags -@@ -2283,7 +2209,8 @@ config("win_pdbaltpath") { +@@ -2291,7 +2208,8 @@ config("win_pdbaltpath") { } # Full symbols. @@ -195,7 +211,7 @@ if (is_win) { if (is_clang) { cflags = [ "/Z7" ] # Debug information in the .obj files. -@@ -2411,7 +2338,8 @@ config("symbols") { +@@ -2419,7 +2337,8 @@ config("symbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. @@ -205,7 +221,7 @@ if (is_win) { # Functions, files, and line tables only. cflags = [] -@@ -2480,7 +2408,8 @@ config("minimal_symbols") { +@@ -2492,7 +2411,8 @@ config("minimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. @@ -216,5 +232,5 @@ ldflags = [ "/DEBUG" ] -- -2.34.1 +2.35.1 ++++++ chromium-102-fenced_frame_utils-include.patch ++++++ >From 7c135a291184b59a59643ed6a8c40b4405ac0175 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Wed, 27 Apr 2022 16:01:01 +0000 Subject: [PATCH] IWYU: add cstring for std::strlen in fenced_frame_utils --- third_party/blink/common/fenced_frame/fenced_frame_utils.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/third_party/blink/common/fenced_frame/fenced_frame_utils.cc b/third_party/blink/common/fenced_frame/fenced_frame_utils.cc index 9e2d3ad..68f4823 100644 --- a/third_party/blink/common/fenced_frame/fenced_frame_utils.cc +++ b/third_party/blink/common/fenced_frame/fenced_frame_utils.cc @@ -4,6 +4,8 @@ #include "third_party/blink/public/common/fenced_frame/fenced_frame_utils.h" +#include <cstring> + #include "base/guid.h" #include "base/strings/string_util.h" -- 2.35.1 ++++++ chromium-102-regex_pattern-array.patch ++++++ --- a/components/autofill/core/browser/BUILD.gn +++ b/components/autofill/core/browser/BUILD.gn @@ -54,6 +54,11 @@ action("regex_patterns_inl_h") { } static_library("browser") { + if (is_clang) { + cflags = [ + "-fbracket-depth=1000", + ] + } sources = [ "address_normalization_manager.cc", "address_normalization_manager.h", ++++++ chromium-102-swiftshader-template-instantiation.patch ++++++ >From 89c498edff683c68df6be0dd224848f4b4af5ae7 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Mon, 25 Apr 2022 13:25:02 +0200 Subject: [PATCH] GCC: add explicit template instantiation Bug: b/223668065 Change-Id: I97ea197273f2b46b6a47a9fdfbbfb5065fbd8edd Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/65268 Kokoro-Result: kokoro <noreply+kok...@google.com> Reviewed-by: Nicolas Capens <nicolascap...@google.com> Reviewed-by: Alexis H??tu <su...@google.com> Commit-Queue: Alexis H??tu <su...@google.com> Tested-by: Alexis H??tu <su...@google.com> --- diff --git a/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp b/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp index fe87eee..94cac3b 100644 --- a/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp +++ b/third_party/swiftshader/third_party/subzero/src/IceInstX8632.cpp @@ -710,6 +710,11 @@ } } +template void emitIASRegOpTyGPR<true, true>(const Cfg *Func, Type Ty, + const Variable *Var, + const Operand *Src, + const GPREmitterRegOp &Emitter); + void emitIASAddrOpTyGPR(const Cfg *Func, Type Ty, const AsmAddress &Addr, const Operand *Src, const GPREmitterAddrOp &Emitter) { Assembler *Asm = Func->getAssembler<Assembler>(); diff --git a/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp b/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp index 9d655a1..f7097d2 100644 --- a/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp +++ b/third_party/swiftshader/third_party/subzero/src/IceInstX8664.cpp @@ -698,6 +698,11 @@ } } +template void emitIASRegOpTyGPR<true, true>(const Cfg *Func, Type Ty, + const Variable *Var, + const Operand *Src, + const GPREmitterRegOp &Emitter); + void emitIASAddrOpTyGPR(const Cfg *Func, Type Ty, const AsmAddress &Addr, const Operand *Src, const GPREmitterAddrOp &Emitter) { Assembler *Asm = Func->getAssembler<Assembler>(); ++++++ chromium-102-symbolize-include.patch ++++++ >From 9dd0503835dc875807ab63efb1f477bffed2a852 Mon Sep 17 00:00:00 2001 From: Stephan Hartmann <sth...@googlemail.com> Date: Mon, 25 Apr 2022 23:18:30 +0000 Subject: [PATCH] IWYU: add utility for std::exchange Bug: 957519 Change-Id: I307d520fdc34d2452018ed32a505e7e519739410 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3604643 Reviewed-by: Wez <w...@chromium.org> Commit-Queue: Stephan Hartmann <sth...@googlemail.com> Cr-Commit-Position: refs/heads/main@{#995855} --- diff --git a/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch b/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch index b7376d8..72900a19 100644 --- a/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch +++ b/base/third_party/symbolize/patches/0001-expose-object-file-helpers.patch @@ -118,11 +118,12 @@ index c6f9ec4360ede..00cfa022219e6 100644 --- a/base/third_party/symbolize/symbolize.h +++ b/base/third_party/symbolize/symbolize.h -@@ -60,6 +60,8 @@ +@@ -60,6 +60,9 @@ #ifdef HAVE_SYMBOLIZE +#include <algorithm> ++#include <utility> + #if defined(__ELF__) // defined by gcc #if defined(__OpenBSD__) diff --git a/base/third_party/symbolize/symbolize.h b/base/third_party/symbolize/symbolize.h index 99029a9..278078f 100644 --- a/base/third_party/symbolize/symbolize.h +++ b/base/third_party/symbolize/symbolize.h @@ -61,6 +61,7 @@ #ifdef HAVE_SYMBOLIZE #include <algorithm> +#include <utility> #if defined(__ELF__) // defined by gcc #if defined(__OpenBSD__) ++++++ chromium-101.0.4951.67.tar.xz -> chromium-102.0.5005.61.tar.xz ++++++ /work/SRC/openSUSE:Factory/chromium/chromium-101.0.4951.67.tar.xz /work/SRC/openSUSE:Factory/.chromium.new.2254/chromium-102.0.5005.61.tar.xz differ: char 27, line 1 ++++++ ffmpeg-new-channel-layout.patch ++++++ >From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001 From: Dale Curtis <dalecur...@chromium.org> Date: Sat, 2 Apr 2022 05:13:53 +0000 Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125 commits) https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526 Created with: roll-dep src/third_party/ffmpeg Fixed: 1293918 Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647 Auto-Submit: Dale Curtis <dalecur...@chromium.org> Reviewed-by: Dan Sanders <sande...@chromium.org> Commit-Queue: Dale Curtis <dalecur...@chromium.org> Cr-Commit-Position: refs/heads/main@{#988253} --- .../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++--------- media/ffmpeg/ffmpeg_common.cc | 11 +++---- media/filters/audio_file_reader.cc | 9 +++--- media/filters/audio_file_reader_unittest.cc | 6 ++-- .../filters/audio_video_metadata_extractor.cc | 11 +++++-- .../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++-- ...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +- media/filters/ffmpeg_audio_decoder.cc | 13 +++++---- 8 files changed, 51 insertions(+), 37 deletions(-) diff --git a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc index e4fc3f460e2..9b1ad9f7675 100644 --- a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc +++ b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc @@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecContext( codec_context->sample_fmt = AV_SAMPLE_FMT_NONE; } - codec_context->channels = config.channel_count; + codec_context->ch_layout.nb_channels = config.channel_count; codec_context->sample_rate = config.samples_per_second; if (config.extra_data) { @@ -124,8 +124,8 @@ void CopySamples(cdm::AudioFormat cdm_format, case cdm::kAudioFormatPlanarS16: case cdm::kAudioFormatPlanarF32: { const int decoded_size_per_channel = - decoded_audio_size / av_frame.channels; - for (int i = 0; i < av_frame.channels; ++i) { + decoded_audio_size / av_frame.ch_layout.nb_channels; + for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) { memcpy(output_buffer, av_frame.extended_data[i], decoded_size_per_channel); output_buffer += decoded_size_per_channel; @@ -185,13 +185,14 @@ bool FFmpegCdmAudioDecoder::Initialize( // Success! decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get()); samples_per_second_ = config.samples_per_second; - bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8; + bytes_per_frame_ = + codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8; output_timestamp_helper_ = std::make_unique<AudioTimestampHelper>(config.samples_per_second); is_initialized_ = true; // Store initial values to guard against midstream configuration changes. - channels_ = codec_context_->channels; + channels_ = codec_context_->ch_layout.nb_channels; av_sample_format_ = codec_context_->sample_fmt; return true; @@ -291,17 +292,19 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer( for (auto& frame : audio_frames) { int decoded_audio_size = 0; if (frame->sample_rate != samples_per_second_ || - frame->channels != channels_ || frame->format != av_sample_format_) { + frame->ch_layout.nb_channels != channels_ || + frame->format != av_sample_format_) { DLOG(ERROR) << "Unsupported midstream configuration change!" << " Sample Rate: " << frame->sample_rate << " vs " - << samples_per_second_ << ", Channels: " << frame->channels - << " vs " << channels_ << ", Sample Format: " << frame->format - << " vs " << av_sample_format_; + << samples_per_second_ + << ", Channels: " << frame->ch_layout.nb_channels << " vs " + << channels_ << ", Sample Format: " << frame->format << " vs " + << av_sample_format_; return cdm::kDecodeError; } decoded_audio_size = av_samples_get_buffer_size( - nullptr, codec_context_->channels, frame->nb_samples, + nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples, codec_context_->sample_fmt, 1); if (!decoded_audio_size) continue; @@ -320,9 +323,9 @@ bool FFmpegCdmAudioDecoder::OnNewFrame( size_t* total_size, std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames, AVFrame* frame) { - *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels, - frame->nb_samples, - codec_context_->sample_fmt, 1); + *total_size += av_samples_get_buffer_size( + nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples, + codec_context_->sample_fmt, 1); audio_frames->emplace_back(av_frame_clone(frame)); return true; } diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index 87ca8969626..76f03d6608e 100644 --- a/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -345,10 +345,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, codec_context->sample_fmt, codec_context->codec_id); ChannelLayout channel_layout = - codec_context->channels > 8 + codec_context->ch_layout.nb_channels > 8 ? CHANNEL_LAYOUT_DISCRETE - : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, - codec_context->channels); + : ChannelLayoutToChromeChannelLayout( + codec_context->ch_layout.u.mask, + codec_context->ch_layout.nb_channels); int sample_rate = codec_context->sample_rate; switch (codec) { @@ -401,7 +402,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, extra_data, encryption_scheme, seek_preroll, codec_context->delay); if (channel_layout == CHANNEL_LAYOUT_DISCRETE) - config->SetChannelsForDiscrete(codec_context->channels); + config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels); #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO) // These are bitstream formats unknown to ffmpeg, so they don't have @@ -470,7 +471,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config, // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses // said information to decode. - codec_context->channels = config.channels(); + codec_context->ch_layout.nb_channels = config.channels(); codec_context->sample_rate = config.samples_per_second(); if (config.extra_data().empty()) { diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc index 5f257bdfaa6..e1be5aa9a5b 100644 --- a/media/filters/audio_file_reader.cc +++ b/media/filters/audio_file_reader.cc @@ -113,14 +113,15 @@ bool AudioFileReader::OpenDecoder() { // Verify the channel layout is supported by Chrome. Acts as a sanity check // against invalid files. See http://crbug.com/171962 - if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout, - codec_context_->channels) == + if (ChannelLayoutToChromeChannelLayout( + codec_context_->ch_layout.u.mask, + codec_context_->ch_layout.nb_channels) == CHANNEL_LAYOUT_UNSUPPORTED) { return false; } // Store initial values to guard against midstream configuration changes. - channels_ = codec_context_->channels; + channels_ = codec_context_->ch_layout.nb_channels; audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id); sample_rate_ = codec_context_->sample_rate; av_sample_format_ = codec_context_->sample_fmt; @@ -223,7 +224,7 @@ bool AudioFileReader::OnNewFrame( if (frames_read < 0) return false; - const int channels = frame->channels; + const int channels = frame->ch_layout.nb_channels; if (frame->sample_rate != sample_rate_ || channels != channels_ || frame->format != av_sample_format_) { DLOG(ERROR) << "Unsupported midstream configuration change!" diff --git a/media/filters/audio_file_reader_unittest.cc b/media/filters/audio_file_reader_unittest.cc index 2aba7927a31..1f45a50cace 100644 --- a/media/filters/audio_file_reader_unittest.cc +++ b/media/filters/audio_file_reader_unittest.cc @@ -121,11 +121,11 @@ class AudioFileReaderTest : public testing::Test { EXPECT_FALSE(reader_->Open()); } - void RunTestFailingDecode(const char* fn) { + void RunTestFailingDecode(const char* fn, int expect_read = 0) { Initialize(fn); EXPECT_TRUE(reader_->Open()); std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets; - EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0); + EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read); } void RunTestPartialDecode(const char* fn) { @@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) { } TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) { - RunTestFailingDecode("midstream_config_change.mp3"); + RunTestFailingDecode("midstream_config_change.mp3", 42624); } #endif diff --git a/media/filters/audio_video_metadata_extractor.cc b/media/filters/audio_video_metadata_extractor.cc index 185819eb936..69ff508c221 100644 --- a/media/filters/audio_video_metadata_extractor.cc +++ b/media/filters/audio_video_metadata_extractor.cc @@ -113,6 +113,15 @@ bool AudioVideoMetadataExtractor::Extract(DataSource* source, if (!stream) continue; + void* display_matrix = + av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr); + if (display_matrix) { + rotation_ = VideoTransformation::FromFFmpegDisplayMatrix( + static_cast<int32_t*>(display_matrix)) + .rotation; + info.tags["rotate"] = base::NumberToString(rotation_); + } + // Extract dictionary from streams also. Needed for containers that attach // metadata to contained streams instead the container itself, like OGG. ExtractDictionary(stream->metadata, &info.tags); @@ -255,8 +264,6 @@ void AudioVideoMetadataExtractor::ExtractDictionary(AVDictionary* metadata, if (raw_tags->find(tag->key) == raw_tags->end()) (*raw_tags)[tag->key] = tag->value; - if (ExtractInt(tag, "rotate", &rotation_)) - continue; if (ExtractString(tag, "album", &album_)) continue; if (ExtractString(tag, "artist", &artist_)) diff --git a/media/filters/ffmpeg_aac_bitstream_converter.cc b/media/filters/ffmpeg_aac_bitstream_converter.cc index 6f231c85729..ca5e5fb927d 100644 --- a/media/filters/ffmpeg_aac_bitstream_converter.cc +++ b/media/filters/ffmpeg_aac_bitstream_converter.cc @@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id || audio_profile_ != stream_codec_parameters_->profile || sample_rate_index_ != sample_rate_index || - channel_configuration_ != stream_codec_parameters_->channels || + channel_configuration_ != + stream_codec_parameters_->ch_layout.nb_channels || frame_length_ != header_plus_packet_size) { header_generated_ = GenerateAdtsHeader(stream_codec_parameters_->codec_id, 0, // layer stream_codec_parameters_->profile, sample_rate_index, 0, // private stream - stream_codec_parameters_->channels, + stream_codec_parameters_->ch_layout.nb_channels, 0, // originality 0, // home 0, // copyrighted_stream @@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) { codec_ = stream_codec_parameters_->codec_id; audio_profile_ = stream_codec_parameters_->profile; sample_rate_index_ = sample_rate_index; - channel_configuration_ = stream_codec_parameters_->channels; + channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels; frame_length_ = header_plus_packet_size; } diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc index 1fd4c5ccd7d..f59bcd8fdaf 100644 --- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc @@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test { memset(&test_parameters_, 0, sizeof(AVCodecParameters)); test_parameters_.codec_id = AV_CODEC_ID_AAC; test_parameters_.profile = FF_PROFILE_AAC_MAIN; - test_parameters_.channels = 2; + test_parameters_.ch_layout.nb_channels = 2; test_parameters_.extradata = extradata_header_; test_parameters_.extradata_size = sizeof(extradata_header_); } diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc index 6a56c675f7d..4615fdeb3fb 100644 --- a/media/filters/ffmpeg_audio_decoder.cc +++ b/media/filters/ffmpeg_audio_decoder.cc @@ -28,7 +28,7 @@ namespace media { // Return the number of channels from the data in |frame|. static inline int DetermineChannels(AVFrame* frame) { - return frame->channels; + return frame->ch_layout.nb_channels; } // Called by FFmpeg's allocation routine to allocate a buffer. Uses @@ -231,7 +231,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer, // Translate unsupported into discrete layouts for discrete configurations; // ffmpeg does not have a labeled discrete configuration internally. ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout( - codec_context_->channel_layout, codec_context_->channels); + codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels); if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED && config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) { channel_layout = CHANNEL_LAYOUT_DISCRETE; @@ -348,11 +348,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) { // Success! av_sample_format_ = codec_context_->sample_fmt; - if (codec_context_->channels != config.channels()) { + if (codec_context_->ch_layout.nb_channels != config.channels()) { MEDIA_LOG(ERROR, media_log_) << "Audio configuration specified " << config.channels() << " channels, but FFmpeg thinks the file contains " - << codec_context_->channels << " channels"; + << codec_context_->ch_layout.nb_channels << " channels"; ReleaseFFmpegResources(); state_ = DecoderState::kUninitialized; return false; @@ -403,7 +403,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, if (frame->nb_samples <= 0) return AVERROR(EINVAL); - if (s->channels != channels) { + if (s->ch_layout.nb_channels != channels) { DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count."; return AVERROR(EINVAL); } @@ -436,7 +436,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s, ChannelLayout channel_layout = config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE ? CHANNEL_LAYOUT_DISCRETE - : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels); + : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask, + s->ch_layout.nb_channels); if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) { DLOG(ERROR) << "Unsupported channel layout."; ++++++ gcc-enable-lto.patch ++++++ --- /var/tmp/diff_new_pack.lmDmpr/_old 2022-05-28 22:16:02.588926111 +0200 +++ /var/tmp/diff_new_pack.lmDmpr/_new 2022-05-28 22:16:02.592926119 +0200 @@ -58,14 +58,14 @@ --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -1986,6 +1986,10 @@ - ] - } + } + } -+ if (gcc_lto) { -+ configs -= [ "//build/config/compiler:gcc_lto" ] -+ } ++ if (gcc_lto) { ++ configs -= [ "//build/config/compiler:gcc_lto" ] ++ } + - if (current_cpu == "x64") { - defines += [ "PA_PCSCAN_STACK_SUPPORTED" ] - sources += [ "allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc" ] + if (use_partition_alloc) { + sources += [ + "allocator/partition_allocator/address_pool_manager_unittest.cc",