From 1ddbfab33776ad6ffb7bf9e57f6a1aec1a1c0338 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 18 Jun 2024 16:04:41 +0200 Subject: [PATCH] ffmpeg: fix libavcodec version check for AVCodecParameters.ch_layout MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 (cherry picked from commit 597bdb8e0784101b5f412feba3309558ad5b8862) Gbp-Pq: Name 0093-ffmpeg-fix-libavcodec-version-check-for-AVCodecParam.patch --- 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 bf65ca36..d8be5d1d 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; -- 2.30.2