ffmpeg: fix libavutil version check for AVFrame.ch_layout
authorSteve Lhomme <robux4@ycbcr.xyz>
Wed, 19 Jun 2024 06:36:40 +0000 (08:36 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
It was added in db6efa1815e217ed76f39aee8b15ee5c64698537 which
was libavutil 57.23.100 at the time but the minor version was not updated in
that commit so we check 57.24.100.

This is part of FFmpeg 5.1.

https://github.com/FFmpeg/FFmpeg/commit/db6efa1815e217ed76f39aee8b15ee5c64698537
(cherry picked from commit f237155887f049f8befef2fdfadae7b60f697b0d)

Gbp-Pq: Name 0095-ffmpeg-fix-libavutil-version-check-for-AVFrame.ch_la.patch

modules/codec/avcodec/audio.c

index fb22f0330053adee1c3ca1a78a21a2743e7e1285..c27771aeb2e63b2b966f501eeed6a189bc171b2e 100644 (file)
@@ -407,7 +407,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         ret = avcodec_receive_frame( ctx, frame );
         if( ret == 0 )
         {
-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100)
+#if LIBAVUTIL_VERSION_CHECK(57, 24, 100)
             int channels = frame->ch_layout.nb_channels;
 #else
             int channels = ctx->channels;