From 88ff89db5bbcb87295666f2e4a9e602d8a9c1394 Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Mon, 9 Oct 2023 10:04:19 +0200 Subject: [PATCH] Backport upstream patch to fix segfault when passing non-existent filter option (rfbz#6773) --- ...ilter-initialize-the-o-to-silence-th.patch | 30 +++++++++++++++++++ ffmpeg.spec | 9 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0001-fftools-ffmpeg_filter-initialize-the-o-to-silence-th.patch diff --git a/0001-fftools-ffmpeg_filter-initialize-the-o-to-silence-th.patch b/0001-fftools-ffmpeg_filter-initialize-the-o-to-silence-th.patch new file mode 100644 index 0000000..85b43a4 --- /dev/null +++ b/0001-fftools-ffmpeg_filter-initialize-the-o-to-silence-th.patch @@ -0,0 +1,30 @@ +From a0a0a804998da8d1a397479c9bafeb000e6be088 Mon Sep 17 00:00:00 2001 +From: Jun Zhao +Date: Sat, 25 Feb 2023 21:54:00 +0800 +Subject: [PATCH] fftools/ffmpeg_filter: initialize the 'o' to silence the + warning + +silence the warning: variable 'o' is used uninitialized whenever +'&&' condition is false + +Signed-off-by: Jun Zhao +--- + fftools/ffmpeg_filter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c +index 1f5bbf6c4d..3504a3cc0a 100644 +--- a/fftools/ffmpeg_filter.c ++++ b/fftools/ffmpeg_filter.c +@@ -362,7 +362,7 @@ fail: + + static int filter_opt_apply(AVFilterContext *f, const char *key, const char *val) + { +- const AVOption *o; ++ const AVOption *o = NULL; + int ret; + + ret = av_opt_set(f, key, val, AV_OPT_SEARCH_CHILDREN); +-- +2.41.0 + diff --git a/ffmpeg.spec b/ffmpeg.spec index 3b16bfd..9598d2e 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -92,7 +92,7 @@ Name: ffmpeg %global pkg_name %{name}%{?pkg_suffix} Version: 6.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A complete solution to record, convert and stream audio and video License: GPL-3.0-or-later URL: https://ffmpeg.org/ @@ -121,6 +121,9 @@ Patch3: ffmpeg-allow-fdk-aac-free.patch # Backport upstream patches for libplacebo v5.264 Patch4: 0001-avfilter-vf_libplacebo-wrap-deprecated-opts-in-FF_AP.patch Patch5: 0001-avfilter-vf_libplacebo-remove-deprecated-field.patch +# Backport fix for segfault when passing non-existent filter option +# See: https://bugzilla.rpmfusion.org/show_bug.cgi?id=6773 +Patch6: 0001-fftools-ffmpeg_filter-initialize-the-o-to-silence-th.patch # Set up dlopen for openh264 Patch1001: ffmpeg-dlopen-openh264.patch @@ -854,6 +857,10 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples %{_mandir}/man3/libswscale.3* %changelog +* Sun Oct 08 2023 Dominik Mierzejewski - 6.0-5 +- Backport upstream patch to fix segfault when passing non-existent filter + option (rfbz#6773) + * Mon Apr 03 2023 Neal Gompa - 6.0-4 - Include RISC-V support sources in the tarball