summaryrefslogtreecommitdiff
path: root/libavcodec/libvo-amrwbenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-04-13 00:10:56 +0300
committerMartin Storsjö <martin@martin.st>2011-04-13 11:30:38 +0300
commit900a129f4f16d4bd19a7707b51eb711382a6e42d (patch)
treede25d2f9ca21966be1206461ed7b1cfdb097fcfe /libavcodec/libvo-amrwbenc.c
parenta8ec07c933450eea929f632ee867383ebd55532a (diff)
libopencore-amr, libvo-amrwbenc: Return proper error codes in most places
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libvo-amrwbenc.c')
-rw-r--r--libavcodec/libvo-amrwbenc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index 661a15d445..a5e8f397c9 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -65,17 +65,17 @@ static av_cold int amr_wb_encode_init(AVCodecContext *avctx)
if (avctx->sample_rate != 16000) {
av_log(avctx, AV_LOG_ERROR, "Only 16000Hz sample rate supported\n");
- return -1;
+ return AVERROR(ENOSYS);
}
if (avctx->channels != 1) {
av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
- return -1;
+ return AVERROR(ENOSYS);
}
if ((s->mode = getWBBitrateMode(avctx->bit_rate)) < 0) {
av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
- return -1;
+ return AVERROR(ENOSYS);
}
avctx->frame_size = 320;
@@ -105,7 +105,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
if ((s->mode = getWBBitrateMode(avctx->bit_rate)) < 0) {
av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
- return -1;
+ return AVERROR(ENOSYS);
}
size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx);
return size;