diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-12-05 18:02:48 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2007-12-05 18:02:48 +0000 |
commit | b17270878e53de0c444b51a20b929187fceb9631 (patch) | |
tree | 60d33354d6068b096b4355266bf1f85615504d8f /libavcodec/h264.c | |
parent | bc2bc41bb8dbfa4c39da5a03ec87bc667bf872dd (diff) | |
download | ffmpeg-b17270878e53de0c444b51a20b929187fceb9631.tar.gz |
Verify long_ref_count!=0. Fix issue 281.
Originally committed as revision 11171 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 19d83197ad..298faa69d8 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3662,7 +3662,7 @@ static int decode_ref_pic_marking(H264Context *h, GetBitContext *gb){ }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; |