mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
extra/ffmpeg to 5.0-3
This commit is contained in:
parent
efea8075a2
commit
d68fd8fcfa
2 changed files with 52 additions and 5 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - use -fPIC in host cflags for v7/v8 to fix print_options.c compile
|
||||
# - explicitly link v5/v6 with libatomic
|
||||
# - remove makedepends on ffnvcodec-headers, remove --enable-nvenc, --enable-nvdec
|
||||
# - remove depends on aom, remove --enable-libaom
|
||||
# - remove depends on intel-media-sdk, remove --enable-libmfx
|
||||
|
@ -16,8 +15,8 @@
|
|||
# - remove --enable-lto
|
||||
|
||||
pkgname=ffmpeg
|
||||
pkgver=4.4.1
|
||||
pkgrel=1
|
||||
pkgver=5.0
|
||||
pkgrel=3
|
||||
epoch=2
|
||||
pkgdesc='Complete solution to record, convert and stream audio and video'
|
||||
arch=(x86_64)
|
||||
|
@ -97,14 +96,16 @@ provides=(
|
|||
libswresample.so
|
||||
libswscale.so
|
||||
)
|
||||
_tag=7e0d640edf6c3eee1816b105c2f7498c4f948e74
|
||||
_tag=390d6853d0ef408007feb39c0040682c81c02751
|
||||
source=(
|
||||
git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}
|
||||
vmaf-model-path.patch
|
||||
add-av_stream_get_first_dts-for-chromium.patch
|
||||
)
|
||||
sha256sums=(
|
||||
SKIP
|
||||
8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d
|
||||
91973c465f01446a999f278f0c2a3763304994dba1ac35de0e4c72f12f39409e
|
||||
)
|
||||
|
||||
pkgver() {
|
||||
|
@ -117,13 +118,15 @@ prepare() {
|
|||
cd ffmpeg
|
||||
git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b # fix nvenc on older gpus
|
||||
patch -Np1 -i "${srcdir}"/vmaf-model-path.patch
|
||||
|
||||
# https://crbug.com/1251779
|
||||
patch -Np1 -i "${srcdir}"/add-av_stream_get_first_dts-for-chromium.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ffmpeg
|
||||
|
||||
[[ $CARCH == "armv7h" || $CARCH == "aarch64" ]] && CONFIG='--host-cflags="-fPIC"'
|
||||
[[ $CARCH == "armv6h" || $CARCH == 'arm' ]] && CONFIG='--extra-libs="-latomic"'
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
|
|
44
extra/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
Normal file
44
extra/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
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;
|
Loading…
Reference in a new issue