[FFmpeg-cvslog] r11171 - trunk/libavcodec/h264.c

takis subversion
Wed Dec 5 19:02:48 CET 2007


Author: takis
Date: Wed Dec  5 19:02:48 2007
New Revision: 11171

Log:
Verify long_ref_count!=0. Fix issue 281.


Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Wed Dec  5 19:02:48 2007
@@ -3662,7 +3662,7 @@ static int decode_ref_pic_marking(H264Co
         }else{
             assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
 
-            if(h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
+            if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
                     !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->reference)) {
                 h->mmco[0].opcode= MMCO_SHORT2UNUSED;
                 h->mmco[0].short_pic_num= h->short_ref[ h->short_ref_count - 1 ]->frame_num;




More information about the ffmpeg-cvslog mailing list