summaryrefslogtreecommitdiff
path: root/libavcodec/g726.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-27 20:49:04 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-01 21:23:03 -0400
commit50969c0f46ce60a32c292b8375b4a442cc908c64 (patch)
treee36a6814a45125f200db2b885f22226684287c48 /libavcodec/g726.c
parent50c466d609ec60a324a7a776dfdb57c8d38faa11 (diff)
g726: return AVERROR(EINVAL) instead of -1 for invalid channel count
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r--libavcodec/g726.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index ffddf95f20..f58bc98dad 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -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;