diff options
author | John Koleszar <jkoleszar@google.com> | 2011-03-04 05:40:33 -0800 |
---|---|---|
committer | Code Review <code-review@webmproject.org> | 2011-03-04 05:40:33 -0800 |
commit | 0bc31f1887c40dc0c689b8337e9d019d2caa4af6 (patch) | |
tree | 03ba1b78b76c94060ac7c5cf6cc38da7c108e8c7 /vp8 | |
parent | fb37eda3e27a8a1e6d3488ff86665f999c6b4ccb (diff) | |
parent | 1de99a2a81da913f9a03433a680be72c229362c1 (diff) | |
download | libvpx-0bc31f1887c40dc0c689b8337e9d019d2caa4af6.tar libvpx-0bc31f1887c40dc0c689b8337e9d019d2caa4af6.tar.gz libvpx-0bc31f1887c40dc0c689b8337e9d019d2caa4af6.tar.bz2 libvpx-0bc31f1887c40dc0c689b8337e9d019d2caa4af6.zip |
Merge "Fixing divide by zero"
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/encoder/onyx_if.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 5dc579d10..39610a73f 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -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); + } } |