diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-12-31 20:59:49 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-01 23:11:47 +0300 |
commit | 3ee323583993cab68bf9d245906d9778273504fa (patch) | |
tree | 3648fecdb0af08e6e69a4644bbe4c38606e3de8a /libavcodec/eacmv.c | |
parent | eb49d259f42066f7f644231f35fd1128833c3d1c (diff) |
avcodec/eacmv: Return more specific error codes and forward error codes
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/eacmv.c')
-rw-r--r-- | libavcodec/eacmv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c index bf4404ce42..6f39d72b88 100644 --- a/libavcodec/eacmv.c +++ b/libavcodec/eacmv.c @@ -191,12 +191,12 @@ static int cmv_decode_frame(AVCodecContext *avctx, if (ret < 0) return ret; if (size > buf_end - buf - EA_PREAMBLE_SIZE) - return -1; + return AVERROR_INVALIDDATA; buf += size; } - if (av_image_check_size(s->width, s->height, 0, s->avctx)) - return -1; + if ((ret = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0) + return ret; if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; |