Commit b5f50da5 authored by Paul B Mahol's avatar Paul B Mahol Committed by Anton Khirnov

v210enc: return proper AVERROR codes instead of -1

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 66fa2a1f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment