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:43 -0300 |
commit | 8777ea2b017e73f53f2c3d53650903e37db6f6ef (patch) | |
tree | 5fbe914146abb4b15ee47a97af3f33b564f9c80b /libavcodec/nellymoserenc.c | |
parent | 53d25983bf2e9db8a9b8107fde9a82aad5259d8a (diff) | |
download | ffmpeg-8777ea2b017e73f53f2c3d53650903e37db6f6ef.tar.gz |
nellymoser: 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/nellymoserenc.c')
-rw-r--r-- | libavcodec/nellymoserenc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 41d9117065..abf7d82160 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -171,11 +171,6 @@ static av_cold int encode_init(AVCodecContext *avctx) NellyMoserEncodeContext *s = avctx->priv_data; int ret; - if (avctx->channels != 1) { - av_log(avctx, AV_LOG_ERROR, "Nellymoser supports only 1 channel\n"); - return AVERROR(EINVAL); - } - if (avctx->sample_rate != 8000 && avctx->sample_rate != 16000 && avctx->sample_rate != 11025 && avctx->sample_rate != 22050 && avctx->sample_rate != 44100 && @@ -431,5 +426,6 @@ const AVCodec ff_nellymoser_encoder = { .close = encode_end, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_NONE }, + .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } }, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; |