From: Steve Lhomme Date: Tue, 18 Jun 2024 14:04:41 +0000 (+0200) Subject: ffmpeg: fix libavcodec version check for AVCodecParameters.ch_layout X-Git-Tag: archive/raspbian/3.0.21-6+rpi1^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1ddbfab33776ad6ffb7bf9e57f6a1aec1a1c0338;p=vlc.git ffmpeg: fix libavcodec version check for AVCodecParameters.ch_layout 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 --- 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;