changeset 904:06776293eabb libavcodec

use spatial error concealment if we dont have a previous frame
author michaelni
date Wed, 04 Dec 2002 11:25:53 +0000
parents 22ee74da2cd3
children 2b93dc762f9a
files error_resilience.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/error_resilience.c	Wed Dec 04 10:04:03 2002 +0000
+++ b/error_resilience.c	Wed Dec 04 11:25:53 2002 +0000
@@ -528,6 +528,8 @@
     
 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++){