From 55fe3c28470de19e3c3423e85ac644e31b3ee75e Mon Sep 17 00:00:00 2001 From: dnygate <64208008+dnygate@users.noreply.github.com> Date: Mon, 7 Sep 2026 17:01:18 +0100 Subject: [PATCH] MT#55283 Fix build with libavcodec older than 61.19 The fallback for `avcodec_get_supported_config()` reads `dec->avc.codec->pix_fmts`, but the decoder struct has no `codec` member, so the build fails on anything below libavcodec 61.19: lib/avc.c:73:39: error: 'struct ' has no member named 'codec' The line above it uses the `codec` argument and so should this one. The encoder path has a `codec` member of its own, which is where this looks to have come from. Closes #2169 Change-Id: Iebf130d19c5107a012c61b821460a5879a777d39 --- lib/avc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/avc.c b/lib/avc.c index 142e5a8f8..2f0fc9159 100644 --- a/lib/avc.c +++ b/lib/avc.c @@ -70,7 +70,7 @@ const char *avc_decoder_init(decoder_t *dec, const str *extra_opts) { avcodec_get_supported_config(dec->avc.avcctx, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0, (const void **) &dec->avc.pixel_fmts, NULL); #else dec->avc.sample_fmts = codec->sample_fmts; - dec->avc.pixel_fmts = dec->avc.codec->pix_fmts; + dec->avc.pixel_fmts = codec->pix_fmts; #endif for (const enum AVSampleFormat *sfmt = dec->avc.sample_fmts; sfmt && *sfmt != -1; sfmt++)