projects
/
profile
/
ivi
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfaee9f
)
Fixing divide by zero
author
Mikhal Shemer
<mikhal@google.com>
Tue, 1 Mar 2011 22:59:22 +0000
(14:59 -0800)
committer
Mikhal Shemer
<mikhal@google.com>
Thu, 3 Mar 2011 18:33:36 +0000
(10:33 -0800)
Change-Id: I9d8a98a2f7ed1e3116d0bae35164618c41998bac
vp8/encoder/onyx_if.c
patch
|
blob
|
history
diff --git
a/vp8/encoder/onyx_if.c
b/vp8/encoder/onyx_if.c
index
5dc579d
..
39610a7
100644
(file)
--- 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);
+ }
}