diff --git a/community/ffmpeg/APKBUILD b/community/ffmpeg/APKBUILD index 61281ee01cc..b9b85e2ad3c 100644 --- a/community/ffmpeg/APKBUILD +++ b/community/ffmpeg/APKBUILD @@ -3,8 +3,8 @@ # Contributor: Jakub Skrzypnik # Maintainer: Natanael Copa pkgname=ffmpeg -pkgver=6.0.1 -pkgrel=1 +pkgver=6.1 +pkgrel=0 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" url="https://ffmpeg.org/" arch="all" @@ -74,16 +74,14 @@ subpackages=" source="https://ffmpeg.org/releases/ffmpeg-$pkgver.tar.xz 0001-ffbuild-libversion.sh-add-shebang.patch add-av_stream_get_first_dts-for-chromium.patch - flto-auto.patch - libswrescale-5.patch v4l-ioctl.patch - v4l2-fix.patch - libplacebo-x1.patch - libplacebo-x2.patch " options="!check" # tests/data/hls-lists.append.m3u8 fails # secfixes: +# 6.1-r0: +# - CVE-2023-47470 +# - CVE-2023-46407 # 6.0.1-r0: # - CVE-2023-47342 # 6.0-r0: @@ -245,7 +243,7 @@ build() { --enable-libxvid \ --enable-libzimg \ --enable-libzmq \ - --enable-lto \ + --enable-lto=auto \ --enable-lv2 \ --enable-openssl \ --enable-pic \ @@ -355,13 +353,8 @@ ffplay() { } sha512sums=" -8a86b2db4a9abb68bb86d770ba1babb76c8b8313cfb0258ae70c88e736a93b99c342a6ecda94b739e8e7c103bed75d4afd756dd94e08c6255f424ef62c264741 ffmpeg-6.0.1.tar.xz +72f47924806b9b128672bd268aa2c8fc2c9b8491899a772b6f82421daa2b67de45a4bdd71f6071825814e599a73adb1e42682e202a12fc055e9a224c7d5baa4a ffmpeg-6.1.tar.xz 38443b570cf32b2ba8ffa9ecc5480425c7da9f93f9773fbb3f9ec5f603b369b6225f4329a1b1f34d0ef30b2c9730f25ff9cff31315ed0a89a600df8e53bd54bf 0001-ffbuild-libversion.sh-add-shebang.patch 2804a3317a9c5fbc793af1dc7b9c13113bf8fd232f14a580ad98f25d848edf93015fd08c0aad0316e3a5439aef88ef15be3520dcbfe844791a5f03490a4c7f0b add-av_stream_get_first_dts-for-chromium.patch -47dda03ef3fddac1f79998bd07044dd907f9ac311737071546cb5cf6b6c51e29dd39cc4458bb07cab049e8ed497358c1e03a4fab07c6c66d7cfeb782ab752e63 flto-auto.patch -a86dab2df808de4693f7f4e276d5090fc5c7b34b85dad866de9ce154149050b3030b68bcbe6463c6954ea241ad38f1ed1fff1658f39e193e26284178867aea88 libswrescale-5.patch c73d751e5d2a8214f0beb1b48fac6829903d46ad7db0dddddf47013193efce487825de495a24408d9a8e3c7f78f15fe62a6c14b54efc80e63dde9903cf08e918 v4l-ioctl.patch -fcb79e7669c7c824bdb5e95c8b6ede2773e6a4ceb244b122a36d881cb8ce41bf4beec139ec67b5ee2df08265bbccc5306e173d7eeabc6e80e82484acf5018bb1 v4l2-fix.patch -3d9e9eb57bc538d1093d2d9de59eccabfc9c6f1275d137fcbff93a576b3d863a11b24671bc6986f3fae086078c27d1ca1ffbbc3e384a3fcd11fb50662438b16b libplacebo-x1.patch -d7ae017f68d73ba26b1218e9ab178c41ad954823939dca2359dc0df9a6e106ea7ffd733bf734f0e7c38f8d28099425054cf9a214331a4a10c182e1a781effa9e libplacebo-x2.patch " diff --git a/community/ffmpeg/flto-auto.patch b/community/ffmpeg/flto-auto.patch deleted file mode 100644 index 5f90e820131..00000000000 --- a/community/ffmpeg/flto-auto.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/configure b/configure -index 9d6457d..f57df0d 100755 ---- a/configure -+++ b/configure -@@ -7126,8 +7126,8 @@ check_optflags -fno-signed-zeros - - if enabled lto; then - test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker" -- check_cflags -flto -- check_ldflags -flto $cpuflags -+ check_cflags -flto=auto -+ check_ldflags -flto=auto $cpuflags - disable inline_asm_direct_symbol_refs - fi - diff --git a/community/ffmpeg/libplacebo-x1.patch b/community/ffmpeg/libplacebo-x1.patch deleted file mode 100644 index 2aa639f3e90..00000000000 --- a/community/ffmpeg/libplacebo-x1.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h -index 899dfdb27dba..1decc4012ee0 100644 ---- a/libavfilter/version_major.h -+++ b/libavfilter/version_major.h -@@ -35,4 +35,6 @@ - * the public API and may change, break or disappear at any time. - */ - -+#define FF_API_LIBPLACEBO_OPTS (LIBAVFILTER_VERSION_MAJOR < 10) -+ - #endif /* AVFILTER_VERSION_MAJOR_H */ -diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c -index 7cd495de2619..d75723289069 100644 ---- a/libavfilter/vf_libplacebo.c -+++ b/libavfilter/vf_libplacebo.c -@@ -132,11 +132,14 @@ typedef struct LibplaceboContext { - int inverse_tonemapping; - float crosstalk; - int tonemapping_lut_size; -+ -+#if FF_API_LIBPLACEBO_OPTS - /* for backwards compatibility */ - float desat_str; - float desat_exp; - int gamut_warning; - int gamut_clipping; -+#endif - - /* pl_dither_params */ - int dithering; -@@ -380,6 +383,7 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out, AVFrame *in) - pl_rect2df_aspect_set(&target.crop, aspect, s->pad_crop_ratio); - } - -+#if FF_API_LIBPLACEBO_OPTS - /* backwards compatibility with older API */ - if (!tonemapping_mode && (s->desat_str >= 0.0f || s->desat_exp >= 0.0f)) { - float str = s->desat_str < 0.0f ? 0.9f : s->desat_str; -@@ -397,6 +401,7 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out, AVFrame *in) - gamut_mode = PL_GAMUT_WARN; - if (s->gamut_clipping) - gamut_mode = PL_GAMUT_DESATURATE; -+#endif - - /* Update render params */ - params = (struct pl_render_params) { -@@ -818,11 +823,14 @@ static const AVOption libplacebo_options[] = { - { "inverse_tonemapping", "Inverse tone mapping (range expansion)", OFFSET(inverse_tonemapping), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, - { "tonemapping_crosstalk", "Crosstalk factor for tone-mapping", OFFSET(crosstalk), AV_OPT_TYPE_FLOAT, {.dbl = 0.04}, 0.0, 0.30, DYNAMIC }, - { "tonemapping_lut_size", "Tone-mapping LUT size", OFFSET(tonemapping_lut_size), AV_OPT_TYPE_INT, {.i64 = 256}, 2, 1024, DYNAMIC }, -+ -+#if FF_API_LIBPLACEBO_OPTS - /* deprecated options for backwards compatibility, defaulting to -1 to not override the new defaults */ - { "desaturation_strength", "Desaturation strength", OFFSET(desat_str), AV_OPT_TYPE_FLOAT, {.dbl = -1.0}, -1.0, 1.0, DYNAMIC | AV_OPT_FLAG_DEPRECATED }, - { "desaturation_exponent", "Desaturation exponent", OFFSET(desat_exp), AV_OPT_TYPE_FLOAT, {.dbl = -1.0}, -1.0, 10.0, DYNAMIC | AV_OPT_FLAG_DEPRECATED }, - { "gamut_warning", "Highlight out-of-gamut colors", OFFSET(gamut_warning), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | AV_OPT_FLAG_DEPRECATED }, - { "gamut_clipping", "Enable colorimetric gamut clipping", OFFSET(gamut_clipping), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | AV_OPT_FLAG_DEPRECATED }, -+#endif - - { "dithering", "Dither method to use", OFFSET(dithering), AV_OPT_TYPE_INT, {.i64 = PL_DITHER_BLUE_NOISE}, -1, PL_DITHER_METHOD_COUNT - 1, DYNAMIC, "dither" }, - { "none", "Disable dithering", 0, AV_OPT_TYPE_CONST, {.i64 = -1}, 0, 0, STATIC, "dither" }, diff --git a/community/ffmpeg/libplacebo-x2.patch b/community/ffmpeg/libplacebo-x2.patch deleted file mode 100644 index ba834660242..00000000000 --- a/community/ffmpeg/libplacebo-x2.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/doc/filters.texi b/doc/filters.texi -index 7a7b2ba4e79e..77b594f69cb1 100644 ---- a/doc/filters.texi -+++ b/doc/filters.texi -@@ -16242,9 +16242,6 @@ Disable linear light scaling. - @item disable_builtin - Disable built-in GPU sampling (forces LUT). - --@item force_icc_lut --Force the use of a full ICC 3DLUT for gamut mapping. -- - @item disable_fbos - Forcibly disable FBOs, resulting in loss of almost all functionality, but - offering the maximum possible speed. -diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c -index d75723289069..757dc519e9ad 100644 ---- a/libavfilter/vf_libplacebo.c -+++ b/libavfilter/vf_libplacebo.c -@@ -97,7 +97,6 @@ typedef struct LibplaceboContext { - float polar_cutoff; - int disable_linear; - int disable_builtin; -- int force_icc_lut; - int force_dither; - int disable_fbos; - -@@ -139,6 +138,7 @@ typedef struct LibplaceboContext { - float desat_exp; - int gamut_warning; - int gamut_clipping; -+ int force_icc_lut; - #endif - - /* pl_dither_params */ -@@ -463,7 +463,6 @@ static int process_frames(AVFilterContext *avctx, AVFrame *out, AVFrame *in) - .polar_cutoff = s->polar_cutoff, - .disable_linear_scaling = s->disable_linear, - .disable_builtin_scalers = s->disable_builtin, -- .force_icc_lut = s->force_icc_lut, - .force_dither = s->force_dither, - .disable_fbos = s->disable_fbos, - }; -@@ -855,7 +854,9 @@ static const AVOption libplacebo_options[] = { - { "polar_cutoff", "Polar LUT cutoff", OFFSET(polar_cutoff), AV_OPT_TYPE_FLOAT, {.dbl = 0}, 0.0, 1.0, DYNAMIC }, - { "disable_linear", "Disable linear scaling", OFFSET(disable_linear), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, - { "disable_builtin", "Disable built-in scalers", OFFSET(disable_builtin), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, -- { "force_icc_lut", "Force the use of a full ICC 3DLUT for color mapping", OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, -+#if FF_API_LIBPLACEBO_OPTS -+ { "force_icc_lut", "Deprecated, does nothing", OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | AV_OPT_FLAG_DEPRECATED }, -+#endif - { "force_dither", "Force dithering", OFFSET(force_dither), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, - { "disable_fbos", "Force-disable FBOs", OFFSET(disable_fbos), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, - { NULL }, diff --git a/community/ffmpeg/libswrescale-5.patch b/community/ffmpeg/libswrescale-5.patch deleted file mode 100644 index e59d31bd856..00000000000 --- a/community/ffmpeg/libswrescale-5.patch +++ /dev/null @@ -1,29 +0,0 @@ -this wasn't bumped for ffmpeg6, so bump it ourselves to not conflict with -ffmpeg 5. otherwise it can't be installed at the same time as ffmpeg 5 libs, -but we have multiple packages, even if the abi is the same. --- -diff --git a/libswresample/version.h b/libswresample/version.h -index 31ecf6f..6b17ade 100644 ---- a/libswresample/version.h -+++ b/libswresample/version.h -@@ -30,7 +30,7 @@ - - #include "version_major.h" - --#define LIBSWRESAMPLE_VERSION_MINOR 10 -+#define LIBSWRESAMPLE_VERSION_MINOR 0 - #define LIBSWRESAMPLE_VERSION_MICRO 100 - - #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ -diff --git a/libswresample/version_major.h b/libswresample/version_major.h -index 7f265c2..dd13f2b 100644 ---- a/libswresample/version_major.h -+++ b/libswresample/version_major.h -@@ -26,6 +26,6 @@ - * Libswresample version macros - */ - --#define LIBSWRESAMPLE_VERSION_MAJOR 4 -+#define LIBSWRESAMPLE_VERSION_MAJOR 5 - - #endif /* SWRESAMPLE_VERSION_MAJOR_H */ diff --git a/community/ffmpeg/v4l2-fix.patch b/community/ffmpeg/v4l2-fix.patch deleted file mode 100644 index cfa69b6d76c..00000000000 --- a/community/ffmpeg/v4l2-fix.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 4fa1d3e7910c3fbe3aacbe5ae5233d0067569c02 Mon Sep 17 00:00:00 2001 -From: Richard Acayan -Date: Tue, 25 Jul 2023 17:38:39 -0400 -Subject: [PATCH] avcodec/v4l2_context: suppress POLLERR and fix crash when - buffers are uninitialized - -A POLLERR occurs when libavcodec attempts to dequeue output buffers -before enqueuing capture buffers. This could happen to an application -deciding to send the first coded packet. Suppress these POLLERRs when -the buffers are uninitialized and avoid crashing because of enumerating -uninitialized buffers. - -See https://trac.ffmpeg.org/ticket/9957 for the original bug report. - -Signed-off-by: Richard Acayan -Signed-off-by: Marton Balint ---- - libavcodec/v4l2_context.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c -index a40be94690..f20f713e1d 100644 ---- a/libavcodec/v4l2_context.c -+++ b/libavcodec/v4l2_context.c -@@ -325,9 +325,13 @@ start: - - /* 0. handle errors */ - if (pfd.revents & POLLERR) { -- /* if we are trying to get free buffers but none have been queued yet -- no need to raise a warning */ -+ /* if we are trying to get free buffers but none have been queued yet, -+ * or if no buffers have been allocated yet, no need to raise a warning -+ */ - if (timeout == 0) { -+ if (!ctx->buffers) -+ return NULL; -+ - for (i = 0; i < ctx->num_buffers; i++) { - if (ctx->buffers[i].status != V4L2BUF_AVAILABLE) - av_log(logger(ctx), AV_LOG_WARNING, "%s POLLERR\n", ctx->name); --- -2.30.2 -