]> git.sesse.net Git - ffmpeg/commitdiff
error_resilience: fix the check for missing references in ff_er_frame_end() for H264
authorLaurent Aimar <fenrir@videolan.org>
Sun, 2 Oct 2011 00:48:12 +0000 (00:48 +0000)
committerJanne Grunau <janne-libav@jannau.net>
Mon, 10 Oct 2011 19:37:36 +0000 (21:37 +0200)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/error_resilience.c

index 11e263624203483ccc41468ef1aba05110c47a68..23ac904c6ccdbe43ca1e32cd632c3db383fea349 100644 (file)
@@ -652,7 +652,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].f.data[0])
+        if (h->list_count <= 0 || h->ref_count[0] <= 0 || !h->ref_list[0][0].f.data[0])
             return 1;
     }