From 0cc2fca1ce72bf9a4d8189d206fe74978bb23592 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 25 Apr 2024 10:04:00 -0400 Subject: [PATCH] MT#55283 version-guard avcodec_close() This has been deprecated in favour of avcodec_free_context() Change-Id: I517f2f2435c66450c876857e03324fb5d24814de (cherry picked from commit 4f6696335516cfe55fd74d058d77841fb60d15c1) --- lib/codeclib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/codeclib.c b/lib/codeclib.c index d1a0ea4fc..782931b8d 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -1744,7 +1744,9 @@ err: static void avc_encoder_close(encoder_t *enc) { if (enc->avc.avcctx) { +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0) avcodec_close(enc->avc.avcctx); +#endif avcodec_free_context(&enc->avc.avcctx); } enc->avc.avcctx = NULL;