projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf42420
)
gst_video_guess_framerate: Don't throw away all precision
author
Jan Schmidt
<jan@centricular.com>
Mon, 9 Jan 2017 10:25:26 +0000
(21:25 +1100)
committer
Jan Schmidt
<jan@centricular.com>
Mon, 9 Jan 2017 10:25:26 +0000
(21:25 +1100)
When operating on framerates near 10000fps, at least keep 1
digit of precision for calculations
gst-libs/gst/video/video.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/video/video.c
b/gst-libs/gst/video/video.c
index
7f39aa4
..
230ebae
100644
(file)
--- a/
gst-libs/gst/video/video.c
+++ b/
gst-libs/gst/video/video.c
@@
-133,8
+133,8
@@
gst_video_guess_framerate (GstClockTime duration, gint * dest_n, gint * dest_d)
/* Use a limited precision conversion by default for more sensible results,
* unless the frame duration is absurdly small (high speed cameras?) */
if (duration > 100000) {
- best_n = 10000;
- best_d = duration / 10000
0
;
+ best_n =
GST_SECOND /
10000;
+ best_d = duration / 10000;
} else {
best_n = GST_SECOND;
best_d = duration;