# HG changeset patch # User michael # Date 1222370728 0 # Node ID 926c3a5dcdd3dffde8381d8c2f3c29b35dfd99f7 # Parent 2c15748c530a3b77516fc83abeab9975247af7f5 Ensure that no non-existing frame is used. Fixes issue624. diff -r 2c15748c530a -r 926c3a5dcdd3 error_resilience.c --- a/error_resilience.c Thu Sep 25 19:01:39 2008 +0000 +++ b/error_resilience.c Thu Sep 25 19:25:28 2008 +0000 @@ -551,7 +551,7 @@ static int is_intra_more_likely(MpegEncContext *s){ int is_intra_likely, i, j, undamaged_count, skip_amount, mb_x, mb_y; - if(s->last_picture_ptr==NULL) return 1; //no previous frame available -> use spatial prediction + if(!s->last_picture_ptr || !s->last_picture_ptr->data[0]) return 1; //no previous frame available -> use spatial prediction undamaged_count=0; for(i=0; imb_num; i++){