File FFmpeg-devel-avcodec-libsvtav1-unbreak-build-with-latest-svtav1.patch of Package ffmpeg-7
From patchwork Sat Feb 22 05:14:23 2025
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Gyan Doshi <ffmpeg@gyani.pro>
X-Patchwork-Id: 54030
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
X-Original-To: ffmpeg-patchwork@ffmpeg.org
Delivered-To: ffmpeg-patchwork@ffmpeg.org
Received: from [127.0.1.1] (localhost [127.0.0.1])
by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0717B68C5F0;
Sat, 22 Feb 2025 07:14:48 +0200 (EET)
X-Original-To: ffmpeg-devel@ffmpeg.org
Delivered-To: ffmpeg-devel@ffmpeg.org
Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151])
by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E447A68C5C3
for <ffmpeg-devel@ffmpeg.org>; Sat, 22 Feb 2025 07:14:40 +0200 (EET)
Received: from smtp202.mailbox.org (smtp202.mailbox.org
[IPv6:2001:67c:2050:b231:465::202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest
SHA256)
(No client certificate requested)
by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Z0FYB2l7Kz9svV
for <ffmpeg-devel@ffmpeg.org>; Sat, 22 Feb 2025 06:14:38 +0100 (CET)
From: Gyan Doshi <ffmpeg@gyani.pro>
To: ffmpeg-devel@ffmpeg.org
Date: Sat, 22 Feb 2025 10:44:23 +0530
Message-ID: <20250222051423.411-1-ffmpeg@gyani.pro>
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4Z0FYB2l7Kz9svV
Subject: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: unbreak build with latest
svtav1
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
<mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
<mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
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");
}