summaryrefslogtreecommitdiff
path: root/libavcodec/roqaudioenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-02-22 18:33:39 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-25 11:49:43 -0500
commitf7a2e12f2a050d9c97c63c3d60c04439aa3ef103 (patch)
treee8d9f323c915b369a452db0e2f765075e439a27b /libavcodec/roqaudioenc.c
parent3fa9a999c1fe44a1592c9b4c01956ff509b86f8a (diff)
roqaudioenc: return AVERROR codes instead of -1
Diffstat (limited to 'libavcodec/roqaudioenc.c')
-rw-r--r--libavcodec/roqaudioenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index 6f36965c8b..cebc53cce5 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -57,11 +57,11 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n");
- return -1;
+ return AVERROR(EINVAL);
}
if (avctx->sample_rate != 22050) {
av_log(avctx, AV_LOG_ERROR, "Audio must be 22050 Hz\n");
- return -1;
+ return AVERROR(EINVAL);
}
avctx->frame_size = ROQ_FRAME_SIZE;