From 47633c77ba6dee728de32ddc37ab19ee70c684a93df741167f93e651704ba878 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 26 Sep 2024 12:23:18 +0200 Subject: [PATCH 1/2] no longer build against libmfx; build also 15.5 against libvpl --- ffmpeg-7.changes | 6 ++++++ ffmpeg-7.spec | 12 ++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ffmpeg-7.changes b/ffmpeg-7.changes index 035132f..d704f35 100644 --- a/ffmpeg-7.changes +++ b/ffmpeg-7.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 26 10:02:20 UTC 2024 - Stefan Dirsch + +- no longer build against libmfx; build also 15.5 against libvpl + (boo#1230983) + ------------------------------------------------------------------- Wed Aug 21 09:58:42 UTC 2024 - Jan Engelhardt diff --git a/ffmpeg-7.spec b/ffmpeg-7.spec index 72111c5..e37aa62 100644 --- a/ffmpeg-7.spec +++ b/ffmpeg-7.spec @@ -230,11 +230,7 @@ BuildRequires: pkgconfig(shaderc) >= 2019.1 BuildRequires: pkgconfig(vulkan) >= 1.3.255 %endif -%if 0%{?suse_version} < 1550 && 0%{?sle_version} >= 150200 && 0%{?sle_version} < 150600 -%ifarch x86_64 %x86_64 -BuildRequires: pkgconfig(libmfx) -%endif -%else +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 %ifarch x86_64 %x86_64 BuildRequires: pkgconfig(vpl) >= 2.6 %endif @@ -631,11 +627,7 @@ LDFLAGS="%_lto_cflags" \ %endif %endif --enable-lv2 \ -%if 0%{?suse_version} < 1550 && 0%{?sle_version} >= 150200 && 0%{?sle_version} < 150600 -%ifarch x86_64 %x86_64 - --enable-libmfx \ -%endif -%else +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 %ifarch x86_64 %x86_64 --enable-libvpl \ %endif -- 2.45.2 From e2cfa392ea5ec5c8759e17515fb74d51aa2b02f06ee8727322a04a4a623387f5 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 30 Sep 2024 12:34:56 +0000 Subject: [PATCH 2/2] avcodec/decode: clean-up if get_hw_frames_parameters fails (ffmpeg#11013, vlc#28811) Signed-off-by: Olaf Hering --- ...lean-up-if-get_hw_frames_parameters-.patch | 27 +++++++++++++++++++ ffmpeg-7.changes | 7 +++++ ffmpeg-7.spec | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch diff --git a/11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch b/11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch new file mode 100644 index 0000000..90be345 --- /dev/null +++ b/11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch @@ -0,0 +1,27 @@ +From: François Cartegnie +Date: Mon, 13 May 2024 11:37:27 +0000 +Subject: avcodec/decode: clean-up if get_hw_frames_parameters fails + +https://trac.ffmpeg.org/ticket/11013 +https://code.videolan.org/videolan/vlc/-/issues/28811 + +Fixes the following assert: + +[00007f1df83d17e0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22 +Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c:349 + +Reproduced from VLC with VAAPI, when fallbacking from hw to sw. + +--- a/libavcodec/pthread_frame.c ++++ b/libavcodec/pthread_frame.c +@@ -344,6 +344,10 @@ FF_ENABLE_DEPRECATION_WARNINGS + return err; + } + ++ // hwaccel could have failed init due to some params ++ if(!dst->hwaccel && dst->internal->hwaccel_priv_data) ++ ff_hwaccel_uninit(dst); ++ + // reset dst hwaccel state if needed + av_assert0(p_dst->hwaccel_threadsafe || + (!dst->hwaccel && !dst->internal->hwaccel_priv_data)); diff --git a/ffmpeg-7.changes b/ffmpeg-7.changes index d704f35..6fcd818 100644 --- a/ffmpeg-7.changes +++ b/ffmpeg-7.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Sep 30 12:34:56 UTC 2024 - olaf@aepfle.de + +- Fix assertion due to missing priv_data cleanup on failed VAAPI + acceleration with 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch + (ffmpeg#11013, vlc#28811) + ------------------------------------------------------------------- Thu Sep 26 10:02:20 UTC 2024 - Stefan Dirsch diff --git a/ffmpeg-7.spec b/ffmpeg-7.spec index e37aa62..0a3093c 100644 --- a/ffmpeg-7.spec +++ b/ffmpeg-7.spec @@ -111,6 +111,7 @@ Patch10: ffmpeg-chromium.patch Patch91: ffmpeg-dlopen-openh264.patch Patch95: ffmpeg-7-fix-crashes.patch Patch96: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch +Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch BuildRequires: ladspa-devel BuildRequires: libgsm-devel BuildRequires: libmp3lame-devel >= 3.98.3 @@ -817,6 +818,7 @@ Patch10: ffmpeg-chromium.patch Patch91: ffmpeg-dlopen-openh264.patch Patch95: ffmpeg-7-fix-crashes.patch Patch96: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch +Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch BuildRequires: c_compiler Requires: this-is-only-for-build-envs -- 2.45.2