integer overflow when reading fps from h264 vui.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15218 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
lorenm 2005-04-19 21:17:39 +00:00
parent 643a40dc01
commit f3bf706a77
2 changed files with 2 additions and 2 deletions

View File

@ -286,7 +286,7 @@ static int h264_parse_vui(mp_mpeg_header_t * picture, unsigned char * buf, unsig
fixed_fps = getbits(buf, n, 1);
if(picture->timeinc_unit > 0 && picture->timeinc_resolution > 0)
picture->fps = (picture->timeinc_resolution * 10000) / picture->timeinc_unit;
picture->fps = ((uint64_t)picture->timeinc_resolution * 10000) / picture->timeinc_unit;
}
//fprintf(stderr, "H264_PARSE_VUI, OVESCAN=%u, VSP_COLOR=%u, CHROMA=%u, TIMING=%u, DISPW=%u, DISPH=%u, TIMERES=%u, TIMEINC=%u, FIXED_FPS=%u\n", overscan, vsp_color, chroma, timing, picture->display_picture_width, picture->display_picture_height,

View File

@ -16,7 +16,7 @@ typedef struct {
int top_field_first;
int display_time; // secs*100
//the following are for mpeg4
int timeinc_resolution, timeinc_bits, timeinc_unit;
unsigned int timeinc_resolution, timeinc_bits, timeinc_unit;
int picture_type;
} mp_mpeg_header_t;