diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD index 78c0070e3ba27ecfc36d3775bbea95d56d943d77..aac114678441fb43ce08c14606c43097b5885243 100644 --- a/community/chromium/APKBUILD +++ b/community/chromium/APKBUILD @@ -128,7 +128,6 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom no-stat-redefine.patch partition-atfork.patch quiche-arena-size.patch - roll-src-third_party-ffmpeg-102.patch roll-src-third_party-ffmpeg-106.patch scoped-file-no-close.patch temp-failure-retry.patch @@ -887,7 +886,6 @@ caf9c4e4533b94dfe6b28350f8ea9654311b684dfd0c5ba768ab14775e0164f577dfd356cd507bca 0c0d3ed0a8f2bcecb2bf4eb56130fcd71031bb63744fb56e1b5a6b9dfbe16680607ff592e24602fe045b819509a70556e240b6fe0e876710977d60185f682df4 no-stat-redefine.patch ad563e29ac7d83c203f5af966c4ed3ebdeb5c997835a45fb28ecde08dde5231d0a775fb413f44867af28724504c42316b27d5a6aaa602057642dcbdf7ec20a7a partition-atfork.patch d315ef36952f35f834742a063b11b312b3adc2b86fc34a73a6906652f4042e6537789aeae5aade3c60523a80eac8d9751eecac3716831b99a2f8725d4ce50df3 quiche-arena-size.patch -128ec0fd14349e065c8bb0910d53cbea7423182a06e06f7b7765f3cba1e5ba5e7a8bccbcdab079335b5235abb7bf0d46dee21ecc8c221be7e1c5c6d9795f958e roll-src-third_party-ffmpeg-102.patch 1063e68f477645914ddf5641eabdd3eaf744e569635d645ea860c3546f67a7ef91eded99331378ee75071b67ecfe9bd4be307bd3da7c7ad93509e2bd634d1ec3 roll-src-third_party-ffmpeg-106.patch 9c44875bcc5dd5431226568ba52d225f086b321325371d9e9e01d1fd892049e5aff324a89ba8268f32c59ce1a47e0b0d5448c9162a45ee5a60a58eecb69ca788 scoped-file-no-close.patch ece751cd29d28772dd0955c84f5553a6858ac24d06ccb66ac75fcfc6b13460cf5c1f27392c094487e20e08e621d2099c3b5cc9a2a819a458e8c56c78fea11269 temp-failure-retry.patch diff --git a/community/chromium/roll-src-third_party-ffmpeg-102.patch b/community/chromium/roll-src-third_party-ffmpeg-102.patch deleted file mode 100644 index 5ca8093923cffb4f3c1778fe68c0452ffa497814..0000000000000000000000000000000000000000 --- a/community/chromium/roll-src-third_party-ffmpeg-102.patch +++ /dev/null @@ -1,287 +0,0 @@ ---- 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 @@ - codec_context->sample_fmt = AV_SAMPLE_FMT_NONE; - } - -- codec_context->ch_layout.nb_channels = config.channel_count; -+ codec_context->channels = config.channel_count; - codec_context->sample_rate = config.samples_per_second; - - if (config.extra_data) { -@@ -124,8 +124,8 @@ - case cdm::kAudioFormatPlanarS16: - case cdm::kAudioFormatPlanarF32: { - const int decoded_size_per_channel = -- decoded_audio_size / av_frame.ch_layout.nb_channels; -- for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) { -+ decoded_audio_size / av_frame.channels; -+ for (int i = 0; i < av_frame.channels; ++i) { - memcpy(output_buffer, av_frame.extended_data[i], - decoded_size_per_channel); - output_buffer += decoded_size_per_channel; -@@ -185,14 +185,13 @@ - // Success! - decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get()); - samples_per_second_ = config.samples_per_second; -- bytes_per_frame_ = -- codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8; -+ bytes_per_frame_ = codec_context_->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_->ch_layout.nb_channels; -+ channels_ = codec_context_->channels; - av_sample_format_ = codec_context_->sample_fmt; - - return true; -@@ -292,19 +291,17 @@ - for (auto& frame : audio_frames) { - int decoded_audio_size = 0; - if (frame->sample_rate != samples_per_second_ || -- frame->ch_layout.nb_channels != channels_ || -- frame->format != av_sample_format_) { -+ frame->channels != channels_ || frame->format != av_sample_format_) { - DLOG(ERROR) << "Unsupported midstream configuration change!" - << " Sample Rate: " << frame->sample_rate << " vs " -- << samples_per_second_ -- << ", Channels: " << frame->ch_layout.nb_channels << " vs " -- << channels_ << ", Sample Format: " << frame->format << " vs " -- << av_sample_format_; -+ << samples_per_second_ << ", Channels: " << frame->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_->ch_layout.nb_channels, frame->nb_samples, -+ nullptr, codec_context_->channels, frame->nb_samples, - codec_context_->sample_fmt, 1); - if (!decoded_audio_size) - continue; -@@ -323,9 +320,9 @@ - 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_->ch_layout.nb_channels, frame->nb_samples, -- codec_context_->sample_fmt, 1); -+ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels, -+ frame->nb_samples, -+ codec_context_->sample_fmt, 1); - audio_frames->emplace_back(av_frame_clone(frame)); - return true; - } ---- a/media/ffmpeg/ffmpeg_common.cc -+++ b/media/ffmpeg/ffmpeg_common.cc -@@ -345,11 +345,10 @@ - codec_context->sample_fmt, codec_context->codec_id); - - ChannelLayout channel_layout = -- codec_context->ch_layout.nb_channels > 8 -+ codec_context->channels > 8 - ? CHANNEL_LAYOUT_DISCRETE -- : ChannelLayoutToChromeChannelLayout( -- codec_context->ch_layout.u.mask, -- codec_context->ch_layout.nb_channels); -+ : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, -+ codec_context->channels); - - int sample_rate = codec_context->sample_rate; - switch (codec) { -@@ -402,7 +401,7 @@ - extra_data, encryption_scheme, seek_preroll, - codec_context->delay); - if (channel_layout == CHANNEL_LAYOUT_DISCRETE) -- config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels); -+ config->SetChannelsForDiscrete(codec_context->channels); - - #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO) - // These are bitstream formats unknown to ffmpeg, so they don't have -@@ -471,7 +470,7 @@ - - // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses - // said information to decode. -- codec_context->ch_layout.nb_channels = config.channels(); -+ codec_context->channels = config.channels(); - codec_context->sample_rate = config.samples_per_second(); - - if (config.extra_data().empty()) { ---- a/media/filters/audio_file_reader.cc -+++ b/media/filters/audio_file_reader.cc -@@ -113,15 +113,14 @@ - - // 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_->ch_layout.u.mask, -- codec_context_->ch_layout.nb_channels) == -+ if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout, -+ codec_context_->channels) == - CHANNEL_LAYOUT_UNSUPPORTED) { - return false; - } - - // Store initial values to guard against midstream configuration changes. -- channels_ = codec_context_->ch_layout.nb_channels; -+ channels_ = codec_context_->channels; - audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id); - sample_rate_ = codec_context_->sample_rate; - av_sample_format_ = codec_context_->sample_fmt; -@@ -224,7 +223,7 @@ - if (frames_read < 0) - return false; - -- const int channels = frame->ch_layout.nb_channels; -+ const int channels = frame->channels; - if (frame->sample_rate != sample_rate_ || channels != channels_ || - frame->format != av_sample_format_) { - DLOG(ERROR) << "Unsupported midstream configuration change!" ---- a/media/filters/audio_file_reader_unittest.cc -+++ b/media/filters/audio_file_reader_unittest.cc -@@ -121,11 +121,11 @@ - EXPECT_FALSE(reader_->Open()); - } - -- void RunTestFailingDecode(const char* fn, int expect_read = 0) { -+ void RunTestFailingDecode(const char* fn) { - Initialize(fn); - EXPECT_TRUE(reader_->Open()); - std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets; -- EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read); -+ EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0); - } - - void RunTestPartialDecode(const char* fn) { -@@ -219,7 +219,7 @@ - } - - TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) { -- RunTestFailingDecode("midstream_config_change.mp3", 42624); -+ RunTestFailingDecode("midstream_config_change.mp3"); - } - #endif - ---- a/media/filters/audio_video_metadata_extractor.cc -+++ b/media/filters/audio_video_metadata_extractor.cc -@@ -113,15 +113,6 @@ - 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); -@@ -264,6 +255,8 @@ - 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_)) ---- a/media/filters/ffmpeg_aac_bitstream_converter.cc -+++ b/media/filters/ffmpeg_aac_bitstream_converter.cc -@@ -195,15 +195,14 @@ - 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_->ch_layout.nb_channels || -+ channel_configuration_ != stream_codec_parameters_->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_->ch_layout.nb_channels, -+ stream_codec_parameters_->channels, - 0, // originality - 0, // home - 0, // copyrighted_stream -@@ -215,7 +214,7 @@ - codec_ = stream_codec_parameters_->codec_id; - audio_profile_ = stream_codec_parameters_->profile; - sample_rate_index_ = sample_rate_index; -- channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels; -+ channel_configuration_ = stream_codec_parameters_->channels; - frame_length_ = header_plus_packet_size; - } - ---- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc -+++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc -@@ -34,7 +34,7 @@ - memset(&test_parameters_, 0, sizeof(AVCodecParameters)); - test_parameters_.codec_id = AV_CODEC_ID_AAC; - test_parameters_.profile = FF_PROFILE_AAC_MAIN; -- test_parameters_.ch_layout.nb_channels = 2; -+ test_parameters_.channels = 2; - test_parameters_.extradata = extradata_header_; - test_parameters_.extradata_size = sizeof(extradata_header_); - } ---- a/media/filters/ffmpeg_audio_decoder.cc -+++ b/media/filters/ffmpeg_audio_decoder.cc -@@ -28,7 +28,7 @@ - - // Return the number of channels from the data in |frame|. - static inline int DetermineChannels(AVFrame* frame) { -- return frame->ch_layout.nb_channels; -+ return frame->channels; - } - - // Called by FFmpeg's allocation routine to allocate a buffer. Uses -@@ -231,7 +231,7 @@ - // Translate unsupported into discrete layouts for discrete configurations; - // ffmpeg does not have a labeled discrete configuration internally. - ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout( -- codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels); -+ codec_context_->channel_layout, codec_context_->channels); - if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED && - config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) { - channel_layout = CHANNEL_LAYOUT_DISCRETE; -@@ -348,11 +348,11 @@ - // Success! - av_sample_format_ = codec_context_->sample_fmt; - -- if (codec_context_->ch_layout.nb_channels != config.channels()) { -+ if (codec_context_->channels != config.channels()) { - MEDIA_LOG(ERROR, media_log_) - << "Audio configuration specified " << config.channels() - << " channels, but FFmpeg thinks the file contains " -- << codec_context_->ch_layout.nb_channels << " channels"; -+ << codec_context_->channels << " channels"; - ReleaseFFmpegResources(); - state_ = DecoderState::kUninitialized; - return false; -@@ -403,7 +403,7 @@ - if (frame->nb_samples <= 0) - return AVERROR(EINVAL); - -- if (s->ch_layout.nb_channels != channels) { -+ if (s->channels != channels) { - DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count."; - return AVERROR(EINVAL); - } -@@ -436,8 +436,7 @@ - ChannelLayout channel_layout = - config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE - ? CHANNEL_LAYOUT_DISCRETE -- : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask, -- s->ch_layout.nb_channels); -+ : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels); - - if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) { - DLOG(ERROR) << "Unsupported channel layout.";