summaryrefslogtreecommitdiff
path: root/libavcodec/v210enc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-02-05 21:14:36 +0000
committerAnton Khirnov <anton@khirnov.net>2012-02-06 07:59:47 +0100
commitb5f50da593b2207dbcc9bde9c3662a5fb397a546 (patch)
treecb8027d18a5330009acf2bff36d489a5f19416c4 /libavcodec/v210enc.c
parent66fa2a1fb371a393b6e03bf85efb08d4df9a7f75 (diff)
downloadffmpeg-b5f50da593b2207dbcc9bde9c3662a5fb397a546.tar.gz
v210enc: return proper AVERROR codes instead of -1
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/v210enc.c')
-rw-r--r--libavcodec/v210enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 6266bb96b1..c31254ebc7 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -28,7 +28,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
{
if (avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n");
- return -1;
+ return AVERROR(EINVAL);
}
if (avctx->pix_fmt != PIX_FMT_YUV422P10) {
@@ -64,7 +64,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
if (buf_size < aligned_width * avctx->height * 8 / 3) {
av_log(avctx, AV_LOG_ERROR, "output buffer too small\n");
- return -1;
+ return AVERROR(ENOMEM);
}
#define CLIP(v) av_clip(v, 4, 1019)