|
|
@ -171,11 +171,6 @@ static av_cold int encode_init(AVCodecContext *avctx) |
|
|
|
NellyMoserEncodeContext *s = avctx->priv_data; |
|
|
|
NellyMoserEncodeContext *s = avctx->priv_data; |
|
|
|
int ret; |
|
|
|
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 && |
|
|
|
if (avctx->sample_rate != 8000 && avctx->sample_rate != 16000 && |
|
|
|
avctx->sample_rate != 11025 && |
|
|
|
avctx->sample_rate != 11025 && |
|
|
|
avctx->sample_rate != 22050 && avctx->sample_rate != 44100 && |
|
|
|
avctx->sample_rate != 22050 && avctx->sample_rate != 44100 && |
|
|
@ -431,5 +426,6 @@ const AVCodec ff_nellymoser_encoder = { |
|
|
|
.close = encode_end, |
|
|
|
.close = encode_end, |
|
|
|
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT, |
|
|
|
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT, |
|
|
|
AV_SAMPLE_FMT_NONE }, |
|
|
|
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, |
|
|
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, |
|
|
|
}; |
|
|
|
}; |
|
|
|