Commit 43c34675 authored by Daniel Kang's avatar Daniel Kang Committed by Carl Eugen Hoyos

Check for invalid motion vector, fixes issue 2521.

Patch by Daniel Kang, daniel.d.kang at gmail

Originally committed as revision 26293 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ebc34883
......@@ -115,6 +115,11 @@ static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax
return;
}
if (ri->last_frame->data[0] == NULL) {
av_log(ri->avctx, AV_LOG_ERROR, "Invalid decode type. Invalid header?\n");
return;
}
for(cp = 0; cp < 3; cp++) {
int outstride = ri->current_frame->linesize[cp];
int instride = ri->last_frame ->linesize[cp];
......
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