Mercurial > libavcodec.hg
changeset 5987:bc6d765d1d53 libavcodec
Verify long_ref_count!=0. Fix issue 281.
author | takis |
---|---|
date | Wed, 05 Dec 2007 18:02:48 +0000 |
parents | da1e68b0e975 |
children | 919193c63fb8 |
files | h264.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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;