Quoting James Almer (2022-01-13 03:05:03) > diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c > index 7ee2f13ac7..d43f45d9ee 100644 > --- a/libavcodec/libfdk-aacenc.c > +++ b/libavcodec/libfdk-aacenc.c > @@ -128,7 +128,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) > int aot = FF_PROFILE_AAC_LOW + 1; > int sce = 0, cpe = 0; > > - if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) { > + if ((err = aacEncOpen(&s->handle, 0, avctx->ch_layout.nb_channels)) != > AACENC_OK) { > av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n", > aac_get_error(err)); > goto error; > @@ -159,7 +159,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) > goto error; > } > > - switch (avctx->channels) { > + switch (avctx->ch_layout.nb_channels) { > case 1: mode = MODE_1; sce = 1; cpe = 0; break; > case 2: > #if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0 > @@ -193,7 +193,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) > case 8: > sce = 2; > cpe = 3; > - if (avctx->channel_layout == AV_CH_LAYOUT_7POINT1) { > + if (avctx->ch_layout.u.mask == AV_CH_LAYOUT_7POINT1) {
Either check for order == NATIVE or use channel_layout_compare. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".