[FFmpeg-devel] [PATCH 135/281] rtp: convert to new channel layout API
Anton Khirnov
anton at khirnov.net
Fri Jan 28 16:15:35 EET 2022
Quoting James Almer (2022-01-13 02:57:52)
> diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
> index 988b7bddfd..20b435039c 100644
> --- a/libavformat/rtpdec_amr.c
> +++ b/libavformat/rtpdec_amr.c
> @@ -64,11 +64,10 @@ static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data,
> return AVERROR_INVALIDDATA;
> }
>
> - if (st->codecpar->channels != 1) {
> + if (st->codecpar->ch_layout.nb_channels != 1) {
> av_log(ctx, AV_LOG_ERROR, "Only mono AMR is supported\n");
> return AVERROR_INVALIDDATA;
> }
> - st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
Looks wrong.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list