Mercurial > libavcodec.hg
comparison h264.c @ 2284:6d26e105f68f libavcodec
h.264 ref list reordering bugfix patch by (Loren Merritt <lorenm at u dot washington dot edu>)
author | michael |
---|---|
date | Sun, 03 Oct 2004 22:01:21 +0000 |
parents | cd43603c46f9 |
children | c5cd8a064c34 |
comparison
equal
deleted
inserted
replaced
2283:e968ff495d3a | 2284:6d26e105f68f |
---|---|
2590 for(index=0; ; index++){ | 2590 for(index=0; ; index++){ |
2591 int reordering_of_pic_nums_idc= get_ue_golomb(&s->gb); | 2591 int reordering_of_pic_nums_idc= get_ue_golomb(&s->gb); |
2592 int pic_id; | 2592 int pic_id; |
2593 int i; | 2593 int i; |
2594 | 2594 |
2595 if(reordering_of_pic_nums_idc==3) | |
2596 break; | |
2595 | 2597 |
2596 if(index >= h->ref_count[list]){ | 2598 if(index >= h->ref_count[list]){ |
2597 av_log(h->s.avctx, AV_LOG_ERROR, "reference count overflow\n"); | 2599 av_log(h->s.avctx, AV_LOG_ERROR, "reference count overflow\n"); |
2598 return -1; | 2600 return -1; |
2599 } | 2601 } |
2632 for(; i>index; i--){ | 2634 for(; i>index; i--){ |
2633 h->ref_list[list][i]= h->ref_list[list][i-1]; | 2635 h->ref_list[list][i]= h->ref_list[list][i-1]; |
2634 } | 2636 } |
2635 h->ref_list[list][index]= tmp; | 2637 h->ref_list[list][index]= tmp; |
2636 } | 2638 } |
2637 }else if(reordering_of_pic_nums_idc==3) | 2639 }else{ |
2638 break; | |
2639 else{ | |
2640 av_log(h->s.avctx, AV_LOG_ERROR, "illegal reordering_of_pic_nums_idc\n"); | 2640 av_log(h->s.avctx, AV_LOG_ERROR, "illegal reordering_of_pic_nums_idc\n"); |
2641 return -1; | 2641 return -1; |
2642 } | 2642 } |
2643 } | 2643 } |
2644 } | 2644 } |