summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2017-01-09 21:25:26 +1100
committerSebastian Dröge <sebastian@centricular.com>2017-01-09 15:50:58 +0200
commitcdd309139412ccb8e669ee48942345d35407e6bf (patch)
treec83d36f833bcf024373c925d35f32c25d65b4986
parent1f243c9a9cb36681e33a734fb73186179d4c9855 (diff)
downloadgstreamer-plugins-base-cdd309139412ccb8e669ee48942345d35407e6bf.tar.gz
gst_video_guess_framerate: Don't throw away all precision
When operating on framerates near 10000fps, at least keep 1 digit of precision for calculations
-rw-r--r--gst-libs/gst/video/video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index 7f39aa44b..230ebae45 100644
--- 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 / 100000;
+ best_n = GST_SECOND / 10000;
+ best_d = duration / 10000;
} else {
best_n = GST_SECOND;
best_d = duration;