lavf: fix integer overflow in rfps calculation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-01 21:16:32 +01:00
parent bacebe1f95
commit f742c7b2ce

View File

@ -2721,7 +2721,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
int framerate= get_std_framerate(i);
double sdts= dts*framerate/(1001*12);
for(j=0; j<2; j++){
int ticks= lrintf(sdts+j*0.5);
int64_t ticks= llrint(sdts+j*0.5);
double error= sdts - ticks + j*0.5;
st->info->duration_error[j][0][i] += error;
st->info->duration_error[j][1][i] += error*error;