[vlc-commits] [Git][videolan/vlc][master] codec: avcodec: fix ch_layout requirement

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jun 20 12:26:35 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
41778535 by François Cartegnie at 2024-06-20T11:53:16+00:00
codec: avcodec: fix ch_layout requirement

refs #28667

- - - - -


3 changed files:

- modules/codec/avcodec/audio.c
- modules/demux/avformat/demux.c
- modules/demux/avformat/mux.c


Changes:

=====================================
modules/codec/avcodec/audio.c
=====================================
@@ -138,7 +138,7 @@ static int OpenAudioCodec( decoder_t *p_dec )
     }
 
     ctx->sample_rate = p_dec->fmt_in->audio.i_rate;
-#if LIBAVUTIL_VERSION_CHECK(56, 31, 100)
+#if LIBAVUTIL_VERSION_CHECK(57, 24, 100)
     av_channel_layout_default( &ctx->ch_layout, p_dec->fmt_in->audio.i_channels );
 #else
     ctx->channels = p_dec->fmt_in->audio.i_channels;


=====================================
modules/demux/avformat/demux.c
=====================================
@@ -470,7 +470,7 @@ int avformat_OpenDemux( vlc_object_t *p_this )
             es_format_Init( &es_fmt, AUDIO_ES, fcc );
             es_fmt.i_original_fourcc = CodecTagToFourcc( cp->codec_tag );
             es_fmt.i_bitrate = cp->bit_rate;
-#if LIBAVUTIL_VERSION_CHECK(56, 31, 100)
+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100)
             es_fmt.audio.i_channels = cp->ch_layout.nb_channels;
 #else
             es_fmt.audio.i_channels = cp->channels;


=====================================
modules/demux/avformat/mux.c
=====================================
@@ -271,7 +271,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(56, 31, 100)
+#if LIBAVCODEC_VERSION_CHECK(59, 24, 100)
         av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels );
 #else
         codecpar->channels = fmt->audio.i_channels;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/41778535dcae8b145ebfaa0392de281e470a91bf

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/41778535dcae8b145ebfaa0392de281e470a91bf
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list