Commit b8a4b015 authored by Michael Niedermayer's avatar Michael Niedermayer

error concealment: check last pictures motion_val before using it.

Fixes NULL pointer dereference.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1cafc232
......@@ -381,7 +381,7 @@ static void guess_mv(MpegEncContext *s){
fixed[mb_xy]= f;
if(f==MV_FROZEN)
num_avail++;
else if(s->last_picture.data[0]){
else if(s->last_picture.data[0] && s->last_picture.motion_val[0]){
const int mb_y= mb_xy / s->mb_stride;
const int mb_x= mb_xy % s->mb_stride;
const int mot_index= (mb_x + mb_y*mot_stride) * mot_step;
......
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