1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

g726: return AVERROR(EINVAL) instead of -1 for invalid channel count

This commit is contained in:
Justin Ruggles 2011-10-27 20:49:04 -04:00
parent 50c466d609
commit 50969c0f46

View File

@ -314,7 +314,7 @@ static av_cold int g726_encode_init(AVCodecContext *avctx)
if(avctx->channels != 1){
av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n");
return -1;
return AVERROR(EINVAL);
}
if (avctx->bit_rate % avctx->sample_rate) {
@ -381,7 +381,7 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
if(avctx->channels != 1){
av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n");
return -1;
return AVERROR(EINVAL);
}
c->code_size = avctx->bits_per_coded_sample;