diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..05a0e946187b8160d0c54c23a9f8100f44e0f43b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.xz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..bd47c9b929ecc99a63ece0acf700e3275767a9ad --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/ffmpeg diff --git a/ffmpeg-4.2.4.tar.xz b/ffmpeg-7.0.2.tar.xz similarity index 50% rename from ffmpeg-4.2.4.tar.xz rename to ffmpeg-7.0.2.tar.xz index a27b389bc2b0c4e25a3fc95c363f55d3c802b8c1..9eecbe7507959259b5b0ec4f30cc02b0d92ab5d1 100644 Binary files a/ffmpeg-4.2.4.tar.xz and b/ffmpeg-7.0.2.tar.xz differ diff --git a/ffmpeg.spec b/ffmpeg.spec index 8410bf58c45ef98517d12f95a98dec642c62352a..fed35311067dcd0510fb064e6b5cc549cadd6d79 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -20,10 +20,8 @@ %global _without_xvid 1 %endif -# Disable nvenc when not relevant -%ifnarch %{cuda_arches} -%global _without_nvenc 1 -%endif +# Disable nvenc +%global _without_nvenc 0 # extras flags %if 0%{!?_cuda_version:1} @@ -45,7 +43,6 @@ %global _with_omx 1 %global _with_omx_rpi 1 %global _with_mmal 1 -ExclusiveArch: armv7hnl %endif %if 0%{?_without_gpl} @@ -58,19 +55,18 @@ ExclusiveArch: armv7hnl %global ffmpeg_license %{?lesser}GPLv2+ %endif +%if "%{?toolchain}" == "clang" +%bcond compiler_clang 1 +%endif + Summary: Digital VCR and streaming server Name: ffmpeg%{?flavor} -Version: 4.2.4 -Release: 2 -License: %{ffmpeg_license} +Version: 7.0.2 +Release: 1 +License: GPL-3.0-or-later URL: http://ffmpeg.org/ -%if 0%{?date} -Source0: ffmpeg-%{?branch}%{date}.tar.bz2 -%else Source0: http://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz -%endif -Patch0: fix_ppc_build.patch -Patch1: fix-vmaf-model-path.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} %{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-drivers-devel} %{?_with_libnpp:BuildRequires: pkgconfig(nppc-%{_cuda_version})} @@ -217,7 +213,6 @@ This package contains development files for %{name} %{!?_without_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\ --enable-bzlib \\\ %{?_with_chromaprint:--enable-chromaprint} \\\ - %{!?_with_crystalhd:--disable-crystalhd} \\\ --enable-fontconfig \\\ %{!?_without_frei0r:--enable-frei0r} \\\ --enable-gcrypt \\\ @@ -282,7 +277,6 @@ This package contains development files for %{name} %{?_with_zmq:--enable-libzmq} \\\ %{!?_without_zvbi:--enable-libzvbi} \\\ --enable-avfilter \\\ - --enable-avresample \\\ --enable-libmodplug \\\ --enable-postproc \\\ --enable-pthreads \\\ @@ -290,16 +284,12 @@ This package contains development files for %{name} --enable-shared \\\ %{!?_without_gpl:--enable-gpl} \\\ --disable-debug \\\ - --disable-stripping + --disable-stripping \\\ + %{?with_compiler_clang:--cc=clang --cxx=clang --host-cc=clang} %prep -%if 0%{?date} -%autosetup -p1 -n ffmpeg-%{?branch}%{date} -echo "git-snapshot-%{?branch}%{date}-rpmfusion" > VERSION -%else %autosetup -p1 -n ffmpeg-%{version} -%endif # fix -O3 -g in host_cflags sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure mkdir -p _doc/examples @@ -347,6 +337,9 @@ cp -pr doc/examples/{*.c,Makefile,README} _doc/examples/ %ifarch armv7hnl --enable-neon \ %endif +%endif +%ifarch sw_64 + --disable-runtime-cpudetect \ %endif || cat ffbuild/config.log @@ -355,9 +348,20 @@ make documentation V=1 make alltools V=1 %install -%make_install V=1 +install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{_libdir} +install -d %{buildroot}%{_libdir}/pkgconfig +install -d %{buildroot}%{_includedir}/%{name} +make install DESTDIR=%{buildroot} V=1 +if [ -d %{buildroot}/usr/local ]; then + cp -a %{buildroot}/usr/local/* %{buildroot}/usr/ + rm -rf %{buildroot}/usr/local +fi +[ -f %{buildroot}%{_bindir}/ffmpeg ] && chmod 755 %{buildroot}%{_bindir}/ffmpeg +[ -f %{buildroot}%{_bindir}/ffplay ] && chmod 755 %{buildroot}%{_bindir}/ffplay +[ -f %{buildroot}%{_bindir}/ffprobe ] && chmod 755 %{buildroot}%{_bindir}/ffprobe %if 0%{!?flavor:1} -rm -r %{buildroot}%{_datadir}/%{name}/examples +rm -rf %{buildroot}%{_datadir}/%{name}/examples 2>/dev/null || : %endif %if 0%{!?progs_suffix:1} install -pm755 tools/qt-faststart %{buildroot}%{_bindir} @@ -397,12 +401,28 @@ install -pm755 tools/qt-faststart %{buildroot}%{_bindir} %doc MAINTAINERS doc/APIchanges doc/*.txt %doc _doc/examples %doc %{_docdir}/%{name}/*.html +%doc %{_docdir}/%{name}/*.css %{_includedir}/%{name} %{_libdir}/pkgconfig/lib*.pc %{_libdir}/lib*.so %changelog +* Thu Sep 4 2025 jinsunrui - 7.0.2-1 +- Upgrade the support version of ffmpeg on the Shenwei platform to 7.0.2, as the new version fixes the previous vulnerability and removes the previous patch packages. + +* Wed Jun 19 2024 happyworker <208suo@208suo.com> - 4.2.4-6 +- Fix CVE-2023-51794 + +* Wed May 01 2024 cenhuilin - 4.2.4-5 +- fix CVE-2024-31578 + +* Thu Jun 2 2022 yangweidong - 4.2.4-4 +- Fix CVE-2021-38114 and CVE-2020-35964 + +* Sat Sep 04 2021 guoxiaoqi - 4.2.4-3 +- Fix CVE-2021-3566 and CVE-2021-38291 + * Tue Jul 20 2021 weidong - 4.2.4-2 - Fix requires conflict diff --git a/ffmpeg.yaml b/ffmpeg.yaml new file mode 100644 index 0000000000000000000000000000000000000000..287bbbadb1a6a2a649130366f2608f5589e637b6 --- /dev/null +++ b/ffmpeg.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://git.ffmpeg.org/ffmpeg.git +tag_prefix: "^n" +separator: "." diff --git a/fix-vmaf-model-path.patch b/fix-vmaf-model-path.patch deleted file mode 100644 index 88a949b438cfdef1e288ce80e548086fdced8505..0000000000000000000000000000000000000000 --- a/fix-vmaf-model-path.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 37b8f54578ac1bcb7a63dc9038a5238fd6a58793 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Sat, 23 May 2020 12:32:44 +0100 -Subject: [PATCH] fix vmaf model path - ---- - libavfilter/vf_libvmaf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c -index 14c3216b3a..e7273b6d1d 100644 ---- a/libavfilter/vf_libvmaf.c -+++ b/libavfilter/vf_libvmaf.c -@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { - #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM - - static const AVOption libvmaf_options[] = { -- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, -+ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, - {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"log_fmt", "Set the format of the log (xml or json).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, - {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, --- -2.26.2 - diff --git a/fix_ppc_build.patch b/fix_ppc_build.patch deleted file mode 100644 index 3c35dc4d214ea8448f6406c84ff847e540aa9445..0000000000000000000000000000000000000000 --- a/fix_ppc_build.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/libswscale/ppc/swscale_vsx.c -+++ b/libswscale/ppc/swscale_vsx.c -@@ -154,7 +154,7 @@ - } - } - --static void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW, -+static av_always_inline void yuv2plane1_nbps_vsx(const int16_t *src, uint16_t *dest, int dstW, - int big_endian, int output_bits) - { - const int dst_u = -(uintptr_t)dest & 7; -@@ -273,7 +273,7 @@ - } - } - --static void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW, -+static av_always_inline void yuv2plane1_16_vsx(const int32_t *src, uint16_t *dest, int dstW, - int big_endian, int output_bits) - { - const int dst_u = -(uintptr_t)dest & 7; -