shithub: libvpx

Download patch

ref: 0bc31f1887c40dc0c689b8337e9d019d2caa4af6
parent: fb37eda3e27a8a1e6d3488ff86665f999c6b4ccb
parent: 1de99a2a81da913f9a03433a680be72c229362c1
author: John Koleszar <jkoleszar@google.com>
date: Fri Mar 4 00:40:33 EST 2011

Merge "Fixing divide by zero"

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -5214,9 +5214,12 @@
         {
             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);
+            }
 
         }