summaryrefslogtreecommitdiff
path: root/libavcodec/kgv1dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-16 22:40:36 +0100
committerAnton Khirnov <anton@khirnov.net>2013-01-06 13:31:40 +0100
commit405486c28bb4d953aa585be0f3742df984c16cb5 (patch)
tree8b01aad564e4de4a8a3ecada2984810fc0892cdb /libavcodec/kgv1dec.c
parente1a7061d63312d44d489995398683583f1bb10da (diff)
kgv1dec: return meaningful error codes.
Diffstat (limited to 'libavcodec/kgv1dec.c')
-rw-r--r--libavcodec/kgv1dec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index fc99b21a58..01655a54b8 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -55,14 +55,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
int w, h, i, res;
if (avpkt->size < 2)
- return -1;
+ return AVERROR_INVALIDDATA;
w = (buf[0] + 1) * 8;
h = (buf[1] + 1) * 8;
buf += 2;
- if (av_image_check_size(w, h, 0, avctx))
- return -1;
+ if ((res = av_image_check_size(w, h, 0, avctx)) < 0)
+ return res;
if (w != avctx->width || h != avctx->height) {
if (c->prev.data[0])