minor bug in LibTheora with UINT32<0
Seems that I (better to say the compiler) found a minor bug in DECINFO.C: there are 6 comparisons of an UINT32 to be "<=" 0 ... while "=", oops "==" in C, would be sufficient ;-)
Warning! W136: Comparison equivalent to 'unsigned == 0'
Warning! W136: Comparison equivalent to 'unsigned == 0'
Warning! W136: Comparison equivalent to 'unsigned == 0'
Warning! W136: Comparison equivalent to 'unsigned == 0'
if(_info->frame_width<=0||_info->frame_height<=0||
_info->pic_width+_info->pic_x>_info->frame_width||
_info->pic_height+_info->pic_y>_info->frame_height||
_info->fps_numerator<=0||_info->fps_denominator<=0){
return TH_EBADHEADER;
Warning! W136: Comparison equivalent to 'unsigned == 0'
Warning! W136: Comparison equivalent to 'unsigned == 0'
/*We shoud have already decoded the info header, and should not yet have
decoded the comment header.*/
if(_info->frame_width<=0||_tc->vendor!=NULL)return TH_EBADHEADER;
ret=oc_comment_unpack(_opb,_tc);
if(ret<0)th_comment_clear(_tc);
else ret=2;
}break;
/*Codec setup header.*/
case 0x82:{
oc_setup_info *setup;
if(_tc==NULL||_setup==NULL)return TH_EFAULT;
/*We should have already decoded the info header and the comment header,
and should not yet have decoded the setup header.*/
if(_info->frame_width<=0||_tc->vendor==NULL||*_setup!=NULL){
return TH_EBADHEADER;
}