summaryrefslogtreecommitdiff
path: root/user/ffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'user/ffmpeg')
-rw-r--r--user/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch2
-rw-r--r--user/ffmpeg/APKBUILD27
-rw-r--r--user/ffmpeg/fix-avcodec-x86-mathops-binutils-241.patch76
3 files changed, 93 insertions, 12 deletions
diff --git a/user/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch b/user/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
index 93e3ac995..9cc6fdfcf 100644
--- a/user/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
+++ b/user/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
@@ -15,7 +15,7 @@ diff --git a/libavutil/internal.h b/libavutil/internal.h
index 61784b5..69d63d5 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
-@@ -177,34 +177,6 @@
+@@ -187,34 +187,6 @@
#endif
/**
diff --git a/user/ffmpeg/APKBUILD b/user/ffmpeg/APKBUILD
index 49be257f1..de3213b98 100644
--- a/user/ffmpeg/APKBUILD
+++ b/user/ffmpeg/APKBUILD
@@ -1,25 +1,27 @@
-# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
+# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=ffmpeg
-pkgver=4.2
-pkgrel=0
+pkgver=4.4.1
+pkgrel=1
pkgdesc="Record, convert, and stream audio and video"
url="https://ffmpeg.org/"
arch="all"
-license="GPL-2.0-only"
options="!check textrels" # Test suite requires proper licensing headers on all files,
# which upstream does not provide.
-subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+license="GPL-2.0-only"
+depends=""
makedepends="alsa-lib-dev bzip2-dev freetype-dev gnutls-dev imlib2-dev
ladspa-dev lame-dev libcdio-dev libcdio-paranoia-dev libmodplug-dev
libtheora-dev libva-dev libvdpau-dev libvorbis-dev libwebp-dev
libxfixes-dev opus-dev perl-dev pulseaudio-dev sdl2-dev
- speex-dev v4l-utils-dev wavpack-dev x264-dev x265-dev xvidcore-dev
+ speex-dev v4l-utils-dev x264-dev x265-dev xvidcore-dev
xz-dev yasm zlib-dev"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://ffmpeg.org/releases/ffmpeg-$pkgver.tar.xz
0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
+ fix-avcodec-x86-mathops-binutils-241.patch
"
# secfixes:
@@ -36,15 +38,19 @@ source="https://ffmpeg.org/releases/ffmpeg-$pkgver.tar.xz
# - CVE-2017-14222
# - CVE-2017-14223
# - CVE-2017-14225
+# 4.2.2-r1:
+# - CVE-2019-13312
+# - CVE-2020-12284
build() {
- local _asm=""
+ _asm=""
case "$CARCH" in
ppc64) _asm="--cpu=G5" ;;
pmmx) _asm="--disable-asm" ;;
esac
+ LDFLAGS="-latomic" \
./configure \
--prefix=/usr \
--enable-avresample \
@@ -75,7 +81,6 @@ build() {
--enable-lzma \
--enable-libspeex \
--enable-libfreetype \
- --enable-libwavpack \
--enable-libwebp \
--enable-libpulse \
--optflags="$CFLAGS" \
@@ -85,7 +90,6 @@ build() {
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install install-man
install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart"
}
@@ -97,5 +101,6 @@ libs() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
-sha512sums="c1f6a86736c417790d7b88d687fdba28c620682a7247d8865062b90a9510b798a0230ab0bc993de85021fefb1044fa929a6c29c77d91b81c52873af569210313 ffmpeg-4.2.tar.xz
-32652e18d4eb231a2e32ad1cacffdf33264aac9d459e0e2e6dd91484fced4e1ca5a62886057b1f0b4b1589c014bbe793d17c78adbaffec195f9a75733b5b18cb 0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch"
+sha512sums="c651c120b71db6991ffc54abc291986e7d35d776203af327f9a28853d1d0af468ca0956e2d3d893f55a211f70a40c041d5aa9aa9664ef581302b27494be9374e ffmpeg-4.4.1.tar.xz
+1047a23eda51b576ac200d5106a1cd318d1d5291643b3a69e025c0a7b6f3dbc9f6eb0e1e6faa231b7e38c8dd4e49a54f7431f87a93664da35825cc2e9e8aedf4 0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
+c1141eb8b8d9d02f021fee2290d02b16d924d2fcca9ea971f9438db46c7d83775bc7ffeb87fba6561008c43359684329c7f7f8f82aea7999b252e3ab98617581 fix-avcodec-x86-mathops-binutils-241.patch"
diff --git a/user/ffmpeg/fix-avcodec-x86-mathops-binutils-241.patch b/user/ffmpeg/fix-avcodec-x86-mathops-binutils-241.patch
new file mode 100644
index 000000000..33fd3d484
--- /dev/null
+++ b/user/ffmpeg/fix-avcodec-x86-mathops-binutils-241.patch
@@ -0,0 +1,76 @@
+From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
+From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
+Date: Sun, 16 Jul 2023 18:18:02 +0300
+Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
+ instructions within inline assembly
+
+Fixes assembling with binutil as >= 2.41
+
+Signed-off-by: James Almer <jamrial@gmail.com>
+---
+ libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
+index 6298f5ed19..ca7e2dffc1 100644
+--- a/libavcodec/x86/mathops.h
++++ b/libavcodec/x86/mathops.h
+@@ -35,12 +35,20 @@
+ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
+ {
+ int rt, dummy;
++ if (__builtin_constant_p(shift))
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
++ :"a"(a), "rm"(b), "i"(shift & 0x1F)
+ );
++ else
++ __asm__ (
++ "imull %3 \n\t"
++ "shrdl %4, %%edx, %%eax \n\t"
++ :"=a"(rt), "=d"(dummy)
++ :"a"(a), "rm"(b), "c"((uint8_t)shift)
++ );
+ return rt;
+ }
+
+@@ -113,19 +121,31 @@ __asm__ volatile(\
+ // avoid +32 for shift optimization (gcc should do that ...)
+ #define NEG_SSR32 NEG_SSR32
+ static inline int32_t NEG_SSR32( int32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("sarl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+
+ #define NEG_USR32 NEG_USR32
+ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("shrl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+
+--
+2.30.2
+