Fix the check for missing references in ff_er_frame_end() for H264.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 1 Oct 2011 22:38:31 +0000 (00:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Oct 2011 03:47:46 +0000 (05:47 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/error_resilience.c

index d6ac81f..0e410f9 100644 (file)
@@ -660,7 +660,7 @@ static int is_intra_more_likely(MpegEncContext *s){
 
     if(s->codec_id == CODEC_ID_H264){
         H264Context *h= (void*)s;
-        if(h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0])
+        if (h->list_count <= 0 || h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0])
             return 1;
     }