summaryrefslogtreecommitdiff
path: root/libavcodec/libilbc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-05-07 07:20:32 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:42 -0300
commit06ed1927b11be71bf6a9946ea8b2964cdd914d45 (patch)
tree2c832f8a14afeb16b9d8831447af929ab150211d /libavcodec/libilbc.c
parent353e4d42194a913f225b3404cae9d6603018a8fc (diff)
downloadffmpeg-06ed1927b11be71bf6a9946ea8b2964cdd914d45.tar.gz
libilbc: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libilbc.c')
-rw-r--r--libavcodec/libilbc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index 04192e3045..cfffe7d520 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -78,8 +78,8 @@ static av_cold int ilbc_decode_init(AVCodecContext *avctx)
WebRtcIlbcfix_InitDecode(&s->decoder, mode, s->enhance);
- avctx->channels = 1;
- avctx->channel_layout = AV_CH_LAYOUT_MONO;
+ av_channel_layout_uninit(&avctx->ch_layout);
+ avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
avctx->sample_rate = 8000;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
@@ -161,7 +161,7 @@ static av_cold int ilbc_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- if (avctx->channels != 1) {
+ if (avctx->ch_layout.nb_channels != 1) {
av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
return AVERROR(EINVAL);
}