Commit 3ee32358 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/eacmv: Return more specific error codes and forward error codes

Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent eb49d259
......@@ -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;
......
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