From 65b6edb8950ac36ce172939f560046c58edf60405b04f3f6d3b8dc3c32442a5b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Mar 2025 11:23:42 +0100 Subject: [PATCH] Add 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch --- ...av1-unbreak-build-with-latest-svtav1.patch | 33 +++++++++++++++++++ ffmpeg-4.changes | 6 ++++ ffmpeg-4.spec | 1 + 3 files changed, 40 insertions(+) create mode 100644 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch diff --git a/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch b/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch new file mode 100644 index 0000000..413b2b3 --- /dev/null +++ b/0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch @@ -0,0 +1,33 @@ +From d1ed5c06e3edc5f2b5f3664c80121fa55b0baa95 Mon Sep 17 00:00:00 2001 +From: Gyan Doshi +Date: Sat, 22 Feb 2025 10:38:53 +0530 +Subject: [PATCH] avcodec/libsvtav1: unbreak build with latest svtav1 + +SVT-AV1 made a change in their public API in 988e930c but without a +version bump or any other accessible marker, thus breaking ffmpeg build +with current versions of SVT-AV1. + +They have finally bumped versions a month later, so check added. +--- + libavcodec/libsvtav1.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c +index 79b28eb4df..43fe531fde 100644 +--- a/libavcodec/libsvtav1.c ++++ b/libavcodec/libsvtav1.c +@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) + + svt_enc->eos_flag = EOS_NOT_REACHED; + ++#if SVT_AV1_CHECK_VERSION(3, 0, 0) ++ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params); ++#else + svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); ++#endif + if (svt_ret != EB_ErrorNone) { + return svt_print_error(avctx, svt_ret, "Error initializing encoder handle"); + } +-- +2.48.1 + diff --git a/ffmpeg-4.changes b/ffmpeg-4.changes index ac8713a..73cb411 100644 --- a/ffmpeg-4.changes +++ b/ffmpeg-4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 5 09:46:09 UTC 2025 - Jan Engelhardt + +- Add 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch + to build with SVT-AV1 3.0.0. + ------------------------------------------------------------------- Fri Feb 19 05:17:22 UTC 2025 - Cliff Zhao diff --git a/ffmpeg-4.spec b/ffmpeg-4.spec index 35a96b2..f4df1ce 100644 --- a/ffmpeg-4.spec +++ b/ffmpeg-4.spec @@ -134,6 +134,7 @@ Patch10: ffmpeg-chromium.patch Patch11: ffmpeg-libglslang-detection.patch Patch14: ffmpeg-glslang-cxx17.patch Patch15: 0001-avutil-hwcontext-Don-t-assume-frames_uninit-is-reent.patch +Patch16: 0001-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch Patch17: ffmpeg-CVE-2023-49502.patch Patch22: ffmpeg-c99.patch Patch23: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch