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

michael subversion
Thu Sep 25 21:25:28 CEST 2008


Author: michael
Date: Thu Sep 25 21:25:28 2008
New Revision: 15416

Log:
Ensure that no non-existing frame is used.
Fixes issue624.


Modified:
   trunk/libavcodec/error_resilience.c

Modified: trunk/libavcodec/error_resilience.c
==============================================================================
--- trunk/libavcodec/error_resilience.c	(original)
+++ trunk/libavcodec/error_resilience.c	Thu Sep 25 21:25:28 2008
@@ -551,7 +551,7 @@ 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_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; i<s->mb_num; i++){




More information about the ffmpeg-cvslog mailing list