mirror of https://git.ffmpeg.org/ffmpeg.git
Prevent NULL dereferences when missing the reference frame in the Electronic Arts CMV decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e9064c9ce8
commit
113d7be624
|
@ -110,6 +110,7 @@ static void cmv_decode_inter(CmvContext * s, const uint8_t *buf, const uint8_t *
|
||||||
}else{ /* inter using last frame as reference */
|
}else{ /* inter using last frame as reference */
|
||||||
int xoffset = (buf[i] & 0xF) - 7;
|
int xoffset = (buf[i] & 0xF) - 7;
|
||||||
int yoffset = ((buf[i] >> 4)) - 7;
|
int yoffset = ((buf[i] >> 4)) - 7;
|
||||||
|
if (s->last_frame.data[0])
|
||||||
cmv_motcomp(s->frame.data[0], s->frame.linesize[0],
|
cmv_motcomp(s->frame.data[0], s->frame.linesize[0],
|
||||||
s->last_frame.data[0], s->last_frame.linesize[0],
|
s->last_frame.data[0], s->last_frame.linesize[0],
|
||||||
x*4, y*4, xoffset, yoffset, s->avctx->width, s->avctx->height);
|
x*4, y*4, xoffset, yoffset, s->avctx->width, s->avctx->height);
|
||||||
|
|
Loading…
Reference in New Issue