Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
5986:da1e68b0e975 | 5987:bc6d765d1d53 |
---|---|
3660 } | 3660 } |
3661 h->mmco_index= i; | 3661 h->mmco_index= i; |
3662 }else{ | 3662 }else{ |
3663 assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); | 3663 assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count); |
3664 | 3664 |
3665 if(h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && | 3665 if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && |
3666 !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->reference)) { | 3666 !(FIELD_PICTURE && !s->first_field && s->current_picture_ptr->reference)) { |
3667 h->mmco[0].opcode= MMCO_SHORT2UNUSED; | 3667 h->mmco[0].opcode= MMCO_SHORT2UNUSED; |
3668 h->mmco[0].short_pic_num= h->short_ref[ h->short_ref_count - 1 ]->frame_num; | 3668 h->mmco[0].short_pic_num= h->short_ref[ h->short_ref_count - 1 ]->frame_num; |
3669 h->mmco_index= 1; | 3669 h->mmco_index= 1; |
3670 if (FIELD_PICTURE) { | 3670 if (FIELD_PICTURE) { |