use spatial error concealment if we dont have a previous frame
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Dec 2002 11:25:53 +0000 (11:25 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Dec 2002 11:25:53 +0000 (11:25 +0000)
Originally committed as revision 1303 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/error_resilience.c

index 584bac8..3cb8d40 100644 (file)
@@ -528,6 +528,8 @@ score_sum+= best_score;
     
 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.data[0]==NULL) return 1; //no previous frame available -> use spatial prediction
 
     undamaged_count=0;
     for(i=0; i<s->mb_num; i++){