[FFmpeg-cvslog] r22732 - trunk/libavcodec/error_resilience.c

michael subversion
Tue Mar 30 22:46:47 CEST 2010


Author: michael
Date: Tue Mar 30 22:46:46 2010
New Revision: 22732

Log:
Make sure the EC code does not attempt to use inter based concealment if there
is no reference frame available. (this can happen because the EC code will attempt
to use reference frames even for I/IDR frames)

Modified:
   trunk/libavcodec/error_resilience.c

Modified: trunk/libavcodec/error_resilience.c
==============================================================================
--- trunk/libavcodec/error_resilience.c	Tue Mar 30 21:37:07 2010	(r22731)
+++ trunk/libavcodec/error_resilience.c	Tue Mar 30 22:46:46 2010	(r22732)
@@ -629,6 +629,12 @@ static int is_intra_more_likely(MpegEncC
             undamaged_count++;
     }
 
+    if(s->codec_id == CODEC_ID_H264){
+        H264Context *h= (void*)s;
+        if(h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0])
+            return 1;
+    }
+
     if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
 
     //prevent dsp.sad() check, that requires access to the image



More information about the ffmpeg-cvslog mailing list