projects/aports·blob master · refs

33 lines · 1.2 KiB

1From d1ed5c06e3edc5f2b5f3664c80121fa55b0baa95 Mon Sep 17 00:00:00 2001
2From: Gyan Doshi <[email protected]>
3Date: Sat, 22 Feb 2025 10:38:53 +0530
4Subject: [PATCH 1/1] avcodec/libsvtav1: unbreak build with latest svtav1
5
6SVT-AV1 made a change in their public API in 988e930c but without a
7version bump or any other accessible marker, thus breaking ffmpeg build
8with current versions of SVT-AV1.
9
10They have finally bumped versions a month later, so check added.
11---
12 libavcodec/libsvtav1.c | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
16index 79b28eb4df54..43fe531fde74 100644
17--- a/libavcodec/libsvtav1.c
18+++ b/libavcodec/libsvtav1.c
19@@ -435,7 +435,11 @@ static av_cold int eb_enc_init(AVCodecContext *avctx)
20
21 svt_enc->eos_flag = EOS_NOT_REACHED;
22
23+#if SVT_AV1_CHECK_VERSION(3, 0, 0)
24+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
25+#else
26 svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
27+#endif
28 if (svt_ret != EB_ErrorNone) {
29 return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
30 }
31--
322.51.0
33