Browse Source

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
tags/n0.8
Daniel Kang Carl Eugen Hoyos 15 years ago
parent
commit
43c34675af
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/roqvideo.c

+ 5
- 0
libavcodec/roqvideo.c View File

@@ -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];


Loading…
Cancel
Save