diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-07 07:20:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:42 -0300 |
commit | e763a7cf0b656b9bebef7e624363dbe26822b191 (patch) | |
tree | 50668599de3d16e2d5dc7d305839aa08295134f0 /libavcodec/g726.c | |
parent | 182866e9e4046b2edefb4126e781f2ecc91b9614 (diff) | |
download | ffmpeg-e763a7cf0b656b9bebef7e624363dbe26822b191.tar.gz |
g726: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r-- | libavcodec/g726.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 2a0148c1d5..082f9b07ad 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -324,7 +324,7 @@ static av_cold int g726_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 is supported\n"); return AVERROR(EINVAL); } @@ -436,12 +436,12 @@ static av_cold int g726_decode_init(AVCodecContext *avctx) { G726Context* c = avctx->priv_data; - if(avctx->channels > 1){ + if (avctx->ch_layout.nb_channels > 1){ avpriv_request_sample(avctx, "Decoding more than one channel"); return AVERROR_PATCHWELCOME; } - 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; c->little_endian = !strcmp(avctx->codec->name, "g726le"); |