[vlc-commits] use CLOCK_FREQ in date_Decrement

Ilkka Ollakka git at videolan.org
Thu Dec 12 08:53:42 CET 2013


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Dec 11 09:02:09 2013 +0200| [46e2b31ea602d119f3829356b9f74e89be3fb84d] | committer: Ilkka Ollakka

use CLOCK_FREQ in date_Decrement

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46e2b31ea602d119f3829356b9f74e89be3fb84d
---

 src/misc/mtime.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/mtime.c b/src/misc/mtime.c
index 9e22a70..06fa3b9 100644
--- a/src/misc/mtime.c
+++ b/src/misc/mtime.c
@@ -212,7 +212,7 @@ mtime_t date_Increment( date_t *p_date, uint32_t i_nb_samples )
  */
 mtime_t date_Decrement( date_t *p_date, uint32_t i_nb_samples )
 {
-    mtime_t i_dividend = (mtime_t)i_nb_samples * 1000000 * p_date->i_divider_den;
+    mtime_t i_dividend = (mtime_t)i_nb_samples * CLOCK_FREQ * p_date->i_divider_den;
     p_date->date -= i_dividend / p_date->i_divider_num;
     unsigned i_rem_adjust = i_dividend % p_date->i_divider_num;
 



More information about the vlc-commits mailing list