1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 18 Jun 2024 16:04:41 +0200
Subject: ffmpeg: fix libavcodec version check for AVCodecParameters.ch_layout
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
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)
---
modules/demux/avformat/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index bf65ca3..d8be5d1 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -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;
|