comparison h264.c @ 5805:12b1717f80a3 libavcodec

fix incorrect check for abs_diff_pic_num overflow patch by Jeff Downs, heydowns a borg d com
author andoma
date Tue, 09 Oct 2007 17:45:34 +0000
parents f896159a1a9e
children 62fc35411cb1
comparison
equal deleted inserted replaced
5804:af7e6436d8bd 5805:12b1717f80a3
3074 if(reordering_of_pic_nums_idc<3){ 3074 if(reordering_of_pic_nums_idc<3){
3075 if(reordering_of_pic_nums_idc<2){ 3075 if(reordering_of_pic_nums_idc<2){
3076 const unsigned int abs_diff_pic_num= get_ue_golomb(&s->gb) + 1; 3076 const unsigned int abs_diff_pic_num= get_ue_golomb(&s->gb) + 1;
3077 int frame_num; 3077 int frame_num;
3078 3078
3079 if(abs_diff_pic_num >= h->max_pic_num){ 3079 if(abs_diff_pic_num > h->max_pic_num){
3080 av_log(h->s.avctx, AV_LOG_ERROR, "abs_diff_pic_num overflow\n"); 3080 av_log(h->s.avctx, AV_LOG_ERROR, "abs_diff_pic_num overflow\n");
3081 return -1; 3081 return -1;
3082 } 3082 }
3083 3083
3084 if(reordering_of_pic_nums_idc == 0) pred-= abs_diff_pic_num; 3084 if(reordering_of_pic_nums_idc == 0) pred-= abs_diff_pic_num;