avcodec/mvha: fix warning: variable 'size' set but not used
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
39561bbe77
commit
93671d6755
|
@ -161,6 +161,9 @@ static int decode_frame(AVCodecContext *avctx,
|
||||||
type = AV_RB32(avpkt->data);
|
type = AV_RB32(avpkt->data);
|
||||||
size = AV_RL32(avpkt->data + 4);
|
size = AV_RL32(avpkt->data + 4);
|
||||||
|
|
||||||
|
if (size < 1 || size >= avpkt->size)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user