aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g723_1enc.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:41 -0300
commit182866e9e4046b2edefb4126e781f2ecc91b9614 (patch)
treee5c522790b51f98fc9079776fb385ebac657e131 /libavcodec/g723_1enc.c
parentc21e1492e35599a52d15332db40731b11e59d3f6 (diff)
downloadffmpeg-182866e9e4046b2edefb4126e781f2ecc91b9614.tar.gz
g723_1: 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/g723_1enc.c')
-rw-r--r--libavcodec/g723_1enc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c
index 2a8149b4cd..7e893fafc7 100644
--- a/libavcodec/g723_1enc.c
+++ b/libavcodec/g723_1enc.c
@@ -99,11 +99,6 @@ static av_cold int g723_1_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- if (avctx->channels != 1) {
- av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
- return AVERROR(EINVAL);
- }
-
if (avctx->bit_rate == 6300) {
p->cur_rate = RATE_6300;
} else if (avctx->bit_rate == 5300) {
@@ -1256,5 +1251,8 @@ const AVCodec ff_g723_1_encoder = {
.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
},
+ .ch_layouts = (const AVChannelLayout[]){
+ AV_CHANNEL_LAYOUT_MONO, { 0 }
+ },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};