summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Chin2022-06-03 16:37:30 +0800
committerNathaniel Chin2022-06-03 16:37:30 +0800
commit38199224e36bc0ba1d5bf86c7474d381b522b0cc (patch)
tree18c4e93b6db19a840b267b9c0d6877c215cae138
parent3a93bb68ba7c562a6a73afbd84e058e78c4cb400 (diff)
downloadaur-38199224e36bc0ba1d5bf86c7474d381b522b0cc.tar.gz
Update to match upstream
-rw-r--r--.SRCINFO6
-rw-r--r--010-ffmpeg-fix-vmaf-model-path.patch11
-rw-r--r--040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch29
-rw-r--r--060-ffmpeg-fix-segfault-with-avisynthplus.patch11
-rw-r--r--PKGBUILD21
5 files changed, 58 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1298729d5d3c..203e6d511078 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ffmpeg-amd-full-git
pkgdesc = Complete solution to record, convert and stream audio and video (all possible features for AMD; git version)
- pkgver = 5.1.r106749.g55e0b041b3
+ pkgver = 5.1.r107046.gc6364b711b
pkgrel = 1
url = https://www.ffmpeg.org/
arch = x86_64
@@ -127,8 +127,12 @@ pkgbase = ffmpeg-amd-full-git
provides = ffmpeg-git
conflicts = ffmpeg
source = git+https://git.ffmpeg.org/ffmpeg.git
+ source = 040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
+ source = 060-ffmpeg-fix-segfault-with-avisynthplus.patch
source = LICENSE
sha256sums = SKIP
+ sha256sums = 2df82046908015bf26bc1303275cf52ba01fa380029a54ea6415373e389e423c
+ sha256sums = 0d6b53940a81ebaf4e6b1a2208a178eb8a824d6a3d8e863bf9c4c7e0060d88ec
sha256sums = 04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36
pkgname = ffmpeg-amd-full-git
diff --git a/010-ffmpeg-fix-vmaf-model-path.patch b/010-ffmpeg-fix-vmaf-model-path.patch
deleted file mode 100644
index 547b3fe8c0d3..000000000000
--- a/010-ffmpeg-fix-vmaf-model-path.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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 (csv, json or xml).", 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},
diff --git a/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch b/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
new file mode 100644
index 000000000000..83fd707e65d0
--- /dev/null
+++ b/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
@@ -0,0 +1,29 @@
+--- a/libavformat/avformat.h
++++ b/libavformat/avformat.h
+@@ -1128,6 +1128,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
+
+ /**
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -55,6 +55,13 @@ int ff_unlock_avformat(void)
+ return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
+ }
+
++// Chromium: We use the internal field first_dts vvv
++int64_t av_stream_get_first_dts(const AVStream *st)
++{
++ return ffstream(st)->first_dts;
++}
++// Chromium: We use the internal field first_dts ^^^
++
+ /* an arbitrarily chosen "sane" max packet size -- 50M */
+ #define SANE_CHUNK_SIZE (50000000)
+
diff --git a/060-ffmpeg-fix-segfault-with-avisynthplus.patch b/060-ffmpeg-fix-segfault-with-avisynthplus.patch
new file mode 100644
index 000000000000..8a8f9c743565
--- /dev/null
+++ b/060-ffmpeg-fix-segfault-with-avisynthplus.patch
@@ -0,0 +1,11 @@
+--- a/libavformat/avisynth.c
++++ b/libavformat/avisynth.c
+@@ -125,7 +125,7 @@ static av_cold void avisynth_atexit_handler(void);
+
+ static av_cold int avisynth_load_library(void)
+ {
+- avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_LOCAL);
++ avs_library.library = dlopen(AVISYNTH_LIB, RTLD_NOW | RTLD_DEEPBIND);
+ if (!avs_library.library)
+ return AVERROR_UNKNOWN;
+
diff --git a/PKGBUILD b/PKGBUILD
index 8d2101e8ad0d..71e997ec54cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=ffmpeg-amd-full-git
_srcname=ffmpeg
-pkgver=5.1.r106749.g55e0b041b3
+pkgver=5.1.r107046.gc6364b711b
pkgrel=1
pkgdesc='Complete solution to record, convert and stream audio and video (all possible features for AMD; git version)'
arch=('x86_64')
@@ -44,21 +44,26 @@ conflicts=('ffmpeg')
_svt_hevc_ver='6e677e0017cb27bfdd62effcfd2a0dc83b48bb16'
_svt_vp9_ver='41819e71950883655dcfa2a8b60cf0a75d50db74'
source=('git+https://git.ffmpeg.org/ffmpeg.git'
- #"020-ffmpeg-add-svt-hevc-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch"
- #"030-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch"
- #"040-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/${_svt_vp9_ver}/ffmpeg_plugin/master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch"
+ #"010-ffmpeg-add-svt-hevc-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch"
+ #"020-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/${_svt_hevc_ver}/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch"
+ #"030-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch"::"https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/${_svt_vp9_ver}/ffmpeg_plugin/master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch"
+ '040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch'
+ '060-ffmpeg-fix-segfault-with-avisynthplus.patch'
'LICENSE')
sha256sums=('SKIP'
#'778030cdd6a097c013e562d3be091280ff92fbd625e5336cd075fbee93589ed0'
#'1cdedb9e8c2912986d6acf20dd9d8ef0f1e21995d9b1898120dc55b714b4de0d'
+ '2df82046908015bf26bc1303275cf52ba01fa380029a54ea6415373e389e423c'
+ '0d6b53940a81ebaf4e6b1a2208a178eb8a824d6a3d8e863bf9c4c7e0060d88ec'
'04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36')
prepare() {
- # add svt codec support for hevc and av1
rm -f ffmpeg/libavcodec/libsvt_{hevc,vp9}.c
- #patch -d ffmpeg -Np1 -i "${srcdir}/020-ffmpeg-add-svt-hevc-g${_svt_hevc_ver:0:7}.patch"
- #patch -d ffmpeg -Np1 -i "${srcdir}/030-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"
- #patch -d ffmpeg -Np1 -i "${srcdir}/040-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch"
+ #patch -d ffmpeg -Np1 -i "${srcdir}/010-ffmpeg-add-svt-hevc-g${_svt_hevc_ver:0:7}.patch"
+ #patch -d ffmpeg -Np1 -i "${srcdir}/020-ffmpeg-add-svt-hevc-docs-g${_svt_hevc_ver:0:7}.patch"
+ #patch -d ffmpeg -Np1 -i "${srcdir}/030-ffmpeg-add-svt-vp9-g${_svt_vp9_ver:0:7}.patch"
+ patch -d ffmpeg -Np1 -i "${srcdir}/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch"
+ patch -d ffmpeg -Np1 -i "${srcdir}/060-ffmpeg-fix-segfault-with-avisynthplus.patch"
}
pkgver() {