Mercurial > libavcodec.hg
diff h264.c @ 5987:bc6d765d1d53 libavcodec
Verify long_ref_count!=0. Fix issue 281.
author | takis |
---|---|
date | Wed, 05 Dec 2007 18:02:48 +0000 |
parents | ba13cc3e38bb |
children | 33b0514769b2 |
line wrap: on
line diff
--- a/h264.c Wed Dec 05 13:11:18 2007 +0000 +++ b/h264.c Wed Dec 05 18:02:48 2007 +0000 @@ -3662,7 +3662,7 @@ }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;