mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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>
This commit is contained in:
parent
eb49d259f4
commit
3ee3235839
@ -191,12 +191,12 @@ static int cmv_decode_frame(AVCodecContext *avctx,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if (size > buf_end - buf - EA_PREAMBLE_SIZE)
|
if (size > buf_end - buf - EA_PREAMBLE_SIZE)
|
||||||
return -1;
|
return AVERROR_INVALIDDATA;
|
||||||
buf += size;
|
buf += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (av_image_check_size(s->width, s->height, 0, s->avctx))
|
if ((ret = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
|
||||||
return -1;
|
return ret;
|
||||||
|
|
||||||
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user