ffmpeg: update to 5.0.1
This commit is contained in:
parent
b4b6666681
commit
bfbe895e6c
|
@ -0,0 +1,23 @@
|
|||
From 3eb43e2e9df80baad20722b3698e6995a546853a Mon Sep 17 00:00:00 2001
|
||||
From: Carlo Landmeter <clandmeter@alpinelinux.org>
|
||||
Date: Tue, 29 Jun 2021 11:56:32 +0000
|
||||
Subject: [PATCH] ffbuild/libversion.sh: add shebang
|
||||
|
||||
when using something like qemu-user where argv[0] is qemu the script
|
||||
will not be exexuted by the shell.
|
||||
---
|
||||
ffbuild/libversion.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/ffbuild/libversion.sh b/ffbuild/libversion.sh
|
||||
index 990ce9f640..30046b1d25 100755
|
||||
--- a/ffbuild/libversion.sh
|
||||
+++ b/ffbuild/libversion.sh
|
||||
@@ -1,3 +1,5 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
toupper(){
|
||||
echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
}
|
||||
--
|
||||
2.32.0
|
|
@ -0,0 +1,55 @@
|
|||
From ab11be0becb90542f10d5713659b559842c53af2 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Tue, 29 Mar 2016 15:15:17 +0200
|
||||
Subject: [PATCH] libavutil: clean up unused FF_SYMVER macro
|
||||
|
||||
There is nothing using it since commit d63443b9 (lavc: drop the
|
||||
av_fast_{re,m}alloc compatibility wrappers).
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
---
|
||||
libavutil/internal.h | 28 ----------------------------
|
||||
1 file changed, 28 deletions(-)
|
||||
|
||||
diff --git a/libavutil/internal.h b/libavutil/internal.h
|
||||
index 61784b5..69d63d5 100644
|
||||
--- a/libavutil/internal.h
|
||||
+++ b/libavutil/internal.h
|
||||
@@ -187,34 +187,6 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
- * Define a function with only the non-default version specified.
|
||||
- *
|
||||
- * On systems with ELF shared libraries, all symbols exported from
|
||||
- * FFmpeg libraries are tagged with the name and major version of the
|
||||
- * library to which they belong. If a function is moved from one
|
||||
- * library to another, a wrapper must be retained in the original
|
||||
- * location to preserve binary compatibility.
|
||||
- *
|
||||
- * Functions defined with this macro will never be used to resolve
|
||||
- * symbols by the build-time linker.
|
||||
- *
|
||||
- * @param type return type of function
|
||||
- * @param name name of function
|
||||
- * @param args argument list of function
|
||||
- * @param ver version tag to assign function
|
||||
- */
|
||||
-#if HAVE_SYMVER_ASM_LABEL
|
||||
-# define FF_SYMVER(type, name, args, ver) \
|
||||
- type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \
|
||||
- type ff_##name args
|
||||
-#elif HAVE_SYMVER_GNU_ASM
|
||||
-# define FF_SYMVER(type, name, args, ver) \
|
||||
- __asm__ (".symver ff_" #name "," EXTERN_PREFIX #name "@" ver); \
|
||||
- type ff_##name args; \
|
||||
- type ff_##name args
|
||||
-#endif
|
||||
-
|
||||
-/**
|
||||
* Return NULL if a threading library has not been enabled.
|
||||
* Used to disable threading functions in AVCodec definitions
|
||||
* when not needed.
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
Patch-Source: https://github.com/archlinux/svntogit-packages/blob/afdf00ac125851675c1599ab46545f6c58cfb655/trunk/add-av_stream_get_first_dts-for-chromium.patch
|
||||
From 95aab0fd83619408995720ce53d7a74790580220 Mon Sep 17 00:00:00 2001
|
||||
From: "liberato@chromium.org" <liberato@chromium.org>
|
||||
Date: Wed, 7 Jul 2021 19:01:22 -0700
|
||||
Subject: [PATCH] Add av_stream_get_first_dts for Chromium
|
||||
|
||||
[foutrelis: adjust for new FFStream struct replacing AVStreamInternal]
|
||||
---
|
||||
libavformat/avformat.h | 4 ++++
|
||||
libavformat/utils.c | 7 +++++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
|
||||
index cd7b0d941c..b4a6dce885 100644
|
||||
--- a/libavformat/avformat.h
|
||||
+++ b/libavformat/avformat.h
|
||||
@@ -1010,6 +1010,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
|
||||
*/
|
||||
int64_t av_stream_get_end_pts(const AVStream *st);
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st);
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
#define AV_PROGRAM_RUNNING 1
|
||||
|
||||
/**
|
||||
diff --git a/libavformat/utils.c b/libavformat/utils.c
|
||||
index de7580c32d..0ef0fe530e 100644
|
||||
--- a/libavformat/utils.c
|
||||
+++ b/libavformat/utils.c
|
||||
@@ -121,6 +121,13 @@ int64_t av_stream_get_end_pts(const AVStream *st)
|
||||
return AV_NOPTS_VALUE;
|
||||
}
|
||||
|
||||
+// Chromium: We use the internal field first_dts vvv
|
||||
+int64_t av_stream_get_first_dts(const AVStream *st)
|
||||
+{
|
||||
+ return cffstream(st)->first_dts;
|
||||
+}
|
||||
+// Chromium: We use the internal field first_dts ^^^
|
||||
+
|
||||
struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
|
||||
{
|
||||
return st->internal->parser;
|
|
@ -0,0 +1,18 @@
|
|||
--- a/libavfilter/vf_drawtext.c 2017-10-26 21:03:03.000000000 +0200
|
||||
+++ b/libavfilter/vf_drawtext.c 2017-11-21 11:06:49.602284422 +0100
|
||||
@@ -39,6 +39,15 @@
|
||||
#endif
|
||||
#include <fenv.h>
|
||||
|
||||
+#if (FE_ALL_EXCEPT == 0)
|
||||
+/* E.g. ARM soft float does not define these */
|
||||
+#define FE_INVALID 0
|
||||
+#define FE_DIVBYZERO 0
|
||||
+#define FE_OVERFLOW 0
|
||||
+#define FE_UNDERFLOW 0
|
||||
+#define FE_INEXACT 0
|
||||
+#endif
|
||||
+
|
||||
#if CONFIG_LIBFONTCONFIG
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
|
@ -0,0 +1,28 @@
|
|||
From 811d290844206fc73dc39c3e5b67d5d895baedf8 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Sat, 26 Jan 2019 19:48:35 +0100
|
||||
Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
|
||||
|
||||
This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.
|
||||
It was hit frequently when watching h264 channels received via DVB-X.
|
||||
Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704
|
||||
---
|
||||
libavcodec/vaapi_h264.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
|
||||
index 5854587a255..f12fdc457a4 100644
|
||||
--- a/libavcodec/vaapi_h264.c
|
||||
+++ b/libavcodec/vaapi_h264.c
|
||||
@@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
|
||||
H264SliceContext *sl = &h->slice_ctx[0];
|
||||
int ret;
|
||||
|
||||
+ if (pic->nb_slices == 0) {
|
||||
+ ret = AVERROR_INVALIDDATA;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
ret = ff_vaapi_decode_issue(avctx, pic);
|
||||
if (ret < 0)
|
||||
goto finish;
|
|
@ -1,19 +1,19 @@
|
|||
# Template file for 'ffmpeg'
|
||||
# audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
|
||||
pkgname=ffmpeg
|
||||
version=4.3.2
|
||||
revision=2
|
||||
version=5.0.1
|
||||
revision=1
|
||||
short_desc="Decoding, encoding and streaming software"
|
||||
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://www.ffmpeg.org"
|
||||
changelog="https://raw.githubusercontent.com/FFmpeg/FFmpeg/master/Changelog"
|
||||
distfiles="${homepage}/releases/ffmpeg-${version}.tar.xz"
|
||||
checksum=46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb
|
||||
checksum=ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b
|
||||
|
||||
hostmakedepends="pkg-config perl yasm"
|
||||
makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel
|
||||
libXext-devel libXvMC-devel libxcb-devel faad2-devel lame-devel libtheora-devel
|
||||
libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel
|
||||
libvorbis-devel x264-devel xvidcore-devel jack-devel SDL2-devel
|
||||
libcdio-paranoia-devel librtmp-devel libmodplug-devel gnutls-devel
|
||||
speex-devel celt-devel harfbuzz-devel libass-devel opus-devel ocl-icd-devel
|
||||
|
@ -23,11 +23,14 @@ makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-deve
|
|||
$(vopt_if vpx libvpx-devel) $(vopt_if aom libaom-devel)
|
||||
$(vopt_if nvenc nv-codec-headers) $(vopt_if sndio sndio-devel)
|
||||
$(vopt_if dav1d libdav1d-devel) $(vopt_if zimg zimg-devel)
|
||||
$(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel)"
|
||||
$(vopt_if webp libwebp-devel) $(vopt_if sofa libmysofa-devel)
|
||||
$(vopt_if vulkan 'vulkan-loader Vulkan-Headers')
|
||||
$(vopt_if drm libdrm-devel) $(vopt_if svtav1 libsvt-av1-devel)"
|
||||
depends="ffplay>=${version}_${revision}"
|
||||
|
||||
build_options="x265 v4l2 vaapi vdpau vpx faac fdk_aac aom nvenc sndio pulseaudio
|
||||
dav1d zimg webp sofa"
|
||||
build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp"
|
||||
dav1d zimg webp sofa vulkan drm svtav1"
|
||||
build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*|x86_64*) build_options_default+=" vaapi vdpau nvenc";;
|
||||
|
@ -35,6 +38,14 @@ case "$XBPS_TARGET_MACHINE" in
|
|||
mips*) CFLAGS="-mnan=legacy";;
|
||||
esac
|
||||
|
||||
if [ "$XBPS_TARGET_WORDSIZE" != "32" ]; then
|
||||
build_options_default+=" svtav1"
|
||||
fi
|
||||
|
||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||
makedepends+=" libatomic-devel"
|
||||
fi
|
||||
|
||||
_apply_patch() {
|
||||
local args="$1" pname="$(basename $2)"
|
||||
|
||||
|
@ -77,6 +88,10 @@ do_configure() {
|
|||
ppc|ppc-musl) _args+=" --disable-altivec";;
|
||||
esac
|
||||
|
||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||
_args+=" --extra-libs=-latomic"
|
||||
fi
|
||||
|
||||
./configure --prefix=/usr --disable-debug --enable-gpl --enable-gnutls \
|
||||
--disable-stripping \
|
||||
--enable-libcdio --enable-version3 --enable-runtime-cpudetect \
|
||||
|
@ -91,19 +106,24 @@ do_configure() {
|
|||
--disable-libopencore_amrnb --disable-libopencore_amrwb \
|
||||
--disable-libopenjpeg \
|
||||
--enable-postproc --enable-opencl ${_args} \
|
||||
$(vopt_if x265 '--enable-libx265' '--disable-libx265') \
|
||||
$(vopt_if v4l2 '--enable-libv4l2' '--disable-libv4l2') \
|
||||
$(vopt_enable x265 libx265) \
|
||||
$(vopt_enable v4l2 libv4l2) \
|
||||
$(vopt_enable aom libaom) $(vopt_enable vaapi) $(vopt_enable vdpau) \
|
||||
--enable-libbs2b --enable-avresample --enable-libvidstab \
|
||||
$(vopt_if dav1d '--enable-libdav1d') \
|
||||
$(vopt_if zimg '--enable-libzimg') \
|
||||
$(vopt_if webp '--enable-libwebp') \
|
||||
$(vopt_if sofa '--enable-libmysofa')
|
||||
--enable-libbs2b --enable-libvidstab \
|
||||
$(vopt_enable dav1d libdav1d) \
|
||||
$(vopt_enable zimg libzimg) \
|
||||
$(vopt_enable webp libwebp) \
|
||||
$(vopt_enable sofa libmysofa) \
|
||||
$(vopt_enable vulkan) \
|
||||
$(vopt_enable drm libdrm) \
|
||||
$(vopt_enable svtav1 libsvtav1)
|
||||
}
|
||||
|
||||
do_build() {
|
||||
make ${makejobs}
|
||||
make doc/ff{mpeg,play}.1
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make DESTDIR=${DESTDIR} install install-man
|
||||
}
|
||||
|
@ -114,54 +134,56 @@ libavcodec_package() {
|
|||
vmove "usr/lib/libavcodec.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libavdevice_package() {
|
||||
short_desc="FFmpeg device handling library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libavdevice.so.*"
|
||||
}
|
||||
}
|
||||
libavresample_package() {
|
||||
short_desc="FFmpeg audio resampling library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libavresample.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libavformat_package() {
|
||||
short_desc="FFmpeg file format library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libavformat.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libavutil_package() {
|
||||
short_desc="FFmpeg utility library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libavutil.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libavfilter_package() {
|
||||
short_desc="FFmpeg audio/video filter library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libavfilter.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libpostproc_package() {
|
||||
short_desc="FFmpeg video postprocessing library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libpostproc.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libswscale_package() {
|
||||
short_desc="FFmpeg video scaling library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libswscale.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libswresample_package() {
|
||||
short_desc="FFmpeg video resampling library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libswresample.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
ffmpeg-devel_package() {
|
||||
depends="
|
||||
libavcodec>=${version}_${revision}
|
||||
|
@ -171,8 +193,7 @@ ffmpeg-devel_package() {
|
|||
libavfilter>=${version}_${revision}
|
||||
libpostproc>=${version}_${revision}
|
||||
libswscale>=${version}_${revision}
|
||||
libswresample>=${version}_${revision}
|
||||
libavresample>=${version}_${revision}"
|
||||
libswresample>=${version}_${revision}"
|
||||
short_desc+=" - development files"
|
||||
pkg_install() {
|
||||
vmove usr/include
|
||||
|
@ -183,3 +204,11 @@ ffmpeg-devel_package() {
|
|||
vmove usr/share/man/man3
|
||||
}
|
||||
}
|
||||
|
||||
ffplay_package() {
|
||||
short_desc="Simple video player using FFmpeg and SDL2"
|
||||
pkg_install() {
|
||||
vmove usr/bin/ffplay
|
||||
vmove "usr/share/man/man1/ffplay*"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue