Skip to content
Snippets Groups Projects
Commit 41778535 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Steve Lhomme
Browse files

codec: avcodec: fix ch_layout requirement

refs #28667
parent 785888ad
No related branches found
No related tags found
1 merge request!5552codec: avcodec: fix ch_layout requirement
Pipeline #483146 passed with warnings with stages
in 28 minutes and 25 seconds
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment