refs #28667
(cherry picked from commit
41778535dcae8b145ebfaa0392de281e470a91bf) (edited)
edited:
- on 3.0 the audio check was still using a LIBAVCODEC_VERSION_CHECK check
- the mux/demux checks were already there with different spaces
Gbp-Pq: Name 0091-codec-avcodec-fix-ch_layout-requirement.patch
}
ctx->sample_rate = p_dec->fmt_in.audio.i_rate;
-#if LIBAVCODEC_VERSION_CHECK(59, 24, 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;
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 LIBAVCODEC_VERSION_CHECK( 59, 24, 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;
{
case AUDIO_ES:
codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
-#if LIBAVCODEC_VERSION_CHECK( 59, 24, 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;