Merge "Fixing divide by zero"

This commit is contained in:
John Koleszar 2011-03-04 05:40:33 -08:00 committed by Code Review
commit 0bc31f1887

View File

@ -5214,9 +5214,12 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
{
long long nanosecs = cpi->source_end_time_stamp
- cpi->last_end_time_stamp_seen;
double this_fps = 10000000.000 / nanosecs;
vp8_new_frame_rate(cpi, (7 * cpi->oxcf.frame_rate + this_fps) / 8);
if (nanosecs > 0)
{
double this_fps = 10000000.000 / nanosecs;
vp8_new_frame_rate(cpi, (7 * cpi->oxcf.frame_rate + this_fps) / 8);
}
}