From 2511b1184fe0d0736fab28e50915d5ecd830c283 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 18 Jun 2025 07:30:18 +0200 Subject: [PATCH] 6.8.3 --- .gitignore | 1 + qt6-qtwebengine.spec | 9 +- qtwebengine-fix-building-system-ffmpeg.patch | 214 ------------------- sources | 2 +- 4 files changed, 7 insertions(+), 219 deletions(-) delete mode 100644 qtwebengine-fix-building-system-ffmpeg.patch diff --git a/.gitignore b/.gitignore index 3f65fc9..e0b9425 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /qtwebengine-everywhere-src-6.8.0-clean.tar.xz /qtwebengine-everywhere-src-6.8.1-clean.tar.xz /qtwebengine-everywhere-src-6.8.2-clean.tar.xz +/qtwebengine-everywhere-src-6.8.3-clean.tar.xz diff --git a/qt6-qtwebengine.spec b/qt6-qtwebengine.spec index ae26bf6..1d50944 100644 --- a/qt6-qtwebengine.spec +++ b/qt6-qtwebengine.spec @@ -52,8 +52,8 @@ Summary: Qt6 - QtWebEngine components Name: qt6-qtwebengine -Version: 6.8.2 -Release: 4%{?dist} +Version: 6.8.3 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html @@ -91,7 +91,6 @@ Patch50: qtwebengine-fix-build.patch ## Upstream patches: # https://bugreports.qt.io/browse/QTBUG-129985 Patch80: qtwebengine-fix-arm-build.patch -Patch81: qtwebengine-fix-building-system-ffmpeg.patch ## Upstreamable patches: @@ -400,7 +399,6 @@ popd ## upstream patches %patch -P80 -p1 -b .fix-arm-build -%patch -P81 -p1 -b .fix-building-system-ffmpeg ## upstreamable patches @@ -709,6 +707,9 @@ done %endif %changelog +* Tue Jun 17 2025 Jan Grulich - 6.8.3-1 +- 6.8.3 + * Tue Mar 04 2025 Jan Grulich - 6.8.2-4 - Unbundle libxml and libxslt diff --git a/qtwebengine-fix-building-system-ffmpeg.patch b/qtwebengine-fix-building-system-ffmpeg.patch deleted file mode 100644 index 40e2e97..0000000 --- a/qtwebengine-fix-building-system-ffmpeg.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 24e9ff7caa6aa78c1c73e7329cf1230a455d0c1b Mon Sep 17 00:00:00 2001 -From: Martin Negyokru -Date: Fri, 17 Jan 2025 15:40:37 +0100 -Subject: [PATCH] [fixup][ffmpeg] Fix building with system ffmpeg - -Refactor workaround for codec selection issues. -Introduce FindDecoder which meant to replace avcodec_find_decoder. -Imporove codec detection in format context. - -Fixes: QTBUG-132762 -Task-number: QTBUG-130273 -Change-Id: I6d520633ebebbb9bdb7aa71b8247066c2a662be3 -Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/617873 -Reviewed-by: Moss Heim -Reviewed-by: Allan Sandfeld Jensen -(cherry picked from commit 54a756b84e0b7a1104f9b336a1253fe36c573f56) -Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/624054 ---- - -diff --git a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc -index 9646e70..5b9a02e 100644 ---- a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc -+++ b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc -@@ -177,7 +177,12 @@ - if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P) - codec_context_->request_sample_fmt = AV_SAMPLE_FMT_S16; - -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+ const AVCodec* codec = -+ FindDecoder(codec_context_->codec_id, codec_context_->codec_whitelist); -+#else - const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); -+#endif - if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { - DLOG(ERROR) << "Could not initialize audio decoder: " - << codec_context_->codec_id; -diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc -index 63159ef..f872a8e 100644 ---- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc -+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc -@@ -29,6 +29,11 @@ - #endif - #endif - -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+extern "C" { -+#include -+} -+#endif - namespace media { - - namespace { -@@ -67,6 +72,24 @@ - VideoFrame::kFrameAddressAlignment % kFFmpegBufferAddressAlignment == 0, - "VideoFrame frame address alignment does not fit ffmpeg requirement"); - -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+const AVCodec* FindDecoder(AVCodecID id, const char* whitelist) { -+ if (!whitelist) { -+ return avcodec_find_decoder(id); -+ } -+ -+ void* i = 0; -+ const AVCodec* codec; -+ while (codec = av_codec_iterate(&i)) { -+ if (av_codec_is_decoder(codec) && codec->id == id && -+ av_match_list(codec->name, whitelist, ',')) { -+ return codec; -+ } -+ } -+ return nullptr; -+} -+#endif -+ - static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond }; - - base::TimeDelta ConvertFromTimeBase(const AVRational& time_base, -diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h -index 9993d34..2332722 100644 ---- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h -+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h -@@ -79,6 +79,12 @@ - av_frame_free(&frame); - } - -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+// Systemlib friendly version of avcodec_find_decoder that respects the -+// whitelisted codecs. -+MEDIA_EXPORT const AVCodec* FindDecoder(AVCodecID id, const char* whitelist); -+#endif -+ - // Converts an int64_t timestamp in |time_base| units to a base::TimeDelta. - // For example if |timestamp| equals 11025 and |time_base| equals {1, 44100} - // then the return value will be a base::TimeDelta for 0.25 seconds since that -diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc -index dd4f3b5..172bd9a 100644 ---- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc -+++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc -@@ -95,7 +95,12 @@ - } - - bool AudioFileReader::OpenDecoder() { -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+ const AVCodec* codec = -+ FindDecoder(codec_context_->codec_id, codec_context_->codec_whitelist); -+#else - const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); -+#endif - if (codec) { - // MP3 decodes to S16P which we don't support, tell it to use S16 instead. - if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P) -diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -index 22fa4d48..5d94b76 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -@@ -360,19 +360,8 @@ - } - - #if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -- // Workaround http://crbug.com/41492567 -- // Chromium only supports the 'libopus' decoder. -- // 'avcodec_find_decoder' finds the experimental 'opus' decoder first -- // because the lookup is based on codec_id and both have the same id. -- // Bundled ffmpeg only have libopus but the system usually have both. -- const AVCodec* codec = [&config, this]() { -- if (config.codec() == AudioCodec::kOpus) -- return avcodec_find_decoder_by_name("libopus"); -- if (config.codec() == AudioCodec::kMP3) { -- return avcodec_find_decoder_by_name("mp3"); -- } -- return avcodec_find_decoder(codec_context_->codec_id); -- }(); -+ AVCodecID id = AudioCodecToCodecID(config.codec(), config.sample_format()); -+ const AVCodec* codec = FindDecoder(id, codec_context_->codec_whitelist); - #else - const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); - #endif -diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc -index 6407b5b..e9bd44b 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc -@@ -242,20 +242,27 @@ - LogContainer(is_local_file, container_); - - #if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -- // Sometimes FFmpeg is not aware of the whitelisted codecs and -- // configures streams and demuxers with unsupported codecs/params. -- // Force the correct codecs to avoid problems later. -+ // 'avformat_find_stream_info' is not aware of the whitelisted codecs. -+ // However it respects the codecs set in the format_context. -+ // Try to force the correct codecs here at context creation. - // https://ffmpeg.org/doxygen/7.0/structAVFormatContext.html#a52f39351b15890ef57cc6ff0ec9ab42d - // https://ffmpeg.org/doxygen/7.0/structAVFormatContext.html#ae5e087f4623b907517c0f7dd8327387d - -- // Note: don't forget to update FFmpeg[Audio|Video]Decoder::ConfigureDecoder -- -- if (strcmp(format_context_->iformat->name, "mp3") == 0) { -- const AVCodec* mp3_codec = avcodec_find_decoder_by_name("mp3"); -- if (mp3_codec) { -- format_context_->audio_codec = mp3_codec; -- } else { -- LOG(ERROR) << "No supported codec for mp3"; -+ for (int i = 0; i < format_context_->nb_streams; i++) { -+ AVCodecParameters *params = format_context_->streams[i]->codecpar; -+ if (!params) -+ continue; -+ const AVCodec* audio_codec = -+ FindDecoder(params->codec_id, GetAllowedAudioDecoders()); -+ if (audio_codec) { -+ if (format_context_->audio_codec && -+ format_context_->audio_codec != audio_codec) { -+ LOG(INFO) << "Conflicting codecs " << format_context_->audio_codec->name -+ << ", " << audio_codec->name; -+ format_context_->audio_codec = nullptr; -+ break; -+ } -+ format_context_->audio_codec = audio_codec; - } - } - #endif -diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -index d08ee1d..832a3fa 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -@@ -524,7 +524,12 @@ - codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; - } - -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+ const AVCodec* codec = -+ FindDecoder(codec_context_->codec_id, codec_context_->codec_whitelist); -+#else - const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); -+#endif - if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { - ReleaseFFmpegResources(); - return false; -diff --git a/src/3rdparty/chromium/media/filters/media_file_checker.cc b/src/3rdparty/chromium/media/filters/media_file_checker.cc -index a2d4757..afe40e4 100644 ---- a/src/3rdparty/chromium/media/filters/media_file_checker.cc -+++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc -@@ -68,7 +68,12 @@ - auto context = AVStreamToAVCodecContext(format_context->streams[i]); - if (!context) - continue; -+#if BUILDFLAG(IS_QTWEBENGINE) && BUILDFLAG(USE_SYSTEM_FFMPEG) -+ const AVCodec* codec = -+ FindDecoder(cp->codec_id, context->codec_whitelist); -+#else - const AVCodec* codec = avcodec_find_decoder(cp->codec_id); -+#endif - if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) { - auto loop = std::make_unique(context.get()); - stream_contexts[i] = {std::move(context), std::move(loop)}; diff --git a/sources b/sources index b5e54a6..0238cf7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qtwebengine-everywhere-src-6.8.2-clean.tar.xz) = 815e632075a7c5bd8950d887f56c66eac280dc02fed976907b8c377544563d19d1bef632336c2d170fdfb55cb271c8982dae3dffce2c2c44646d212125ebb3b3 +SHA512 (qtwebengine-everywhere-src-6.8.3-clean.tar.xz) = 8ad607d14de380244600461ef0e5d4c842cea2cbe909e678be8075eeb61e0ee4c3ccd4fb992ce42e5ac7c0634bd2e845172f7cb9240c45a1b764a01669f51d57 SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be