ffmpeg: fix libavcodec version check for AVCodecParameters.ch_layout
authorSteve Lhomme <robux4@ycbcr.xyz>
Tue, 18 Jun 2024 14:04:41 +0000 (16:04 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
It was added in 276c06726fbd2f784d51189870bd834e9284812f which
was libavcodec 59.23.100 at the time but the minor version was not updated in
that commit so we check 59.24.100.

This is part of FFmpeg 5.1.

It was erroneously removed in a55ec32ab3760d9edb6f05481cd3a981aa42878d.

https://github.com/FFmpeg/FFmpeg/commit/276c06726fbd2f784d51189870bd834e9284812f

Co-authored-by: François Cartegnie <fcvlcdev@free.fr>
(cherry picked from commit 597bdb8e0784101b5f412feba3309558ad5b8862)

Gbp-Pq: Name 0093-ffmpeg-fix-libavcodec-version-check-for-AVCodecParam.patch

modules/demux/avformat/mux.c

index bf65ca36716fc7f92603f757eeeb65535d777251..d8be5d1d9f53e612e1b69e73008ce3cc053f13e8 100644 (file)
@@ -273,7 +273,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     {
     case AUDIO_ES:
         codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
-#if LIBAVUTIL_VERSION_CHECK(57, 24, 100)
+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100) && LIBAVUTIL_VERSION_CHECK(57, 24, 100)
         av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels );
 #else
         codecpar->channels = fmt->audio.i_channels;