audio: Use rounding scaling functions for GST_CLOCK_TIME_TO_FRAMES and _FRAMES_TO_CLO...
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 19 Jan 2010 08:25:35 +0000 (09:25 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 19 Jan 2010 08:26:37 +0000 (09:26 +0100)
Fixes bug #607381.

gst-libs/gst/audio/audio.h

index 7d1eae5e1bb351f95a52c9e9ed1e8e75cec7e6f1..12a12e00295dddd248225fe2afc77495f4da4896 100644 (file)
@@ -58,7 +58,7 @@ G_BEGIN_DECLS
  * Calculate clocktime from sample @frames and @rate.
  */
 #define GST_FRAMES_TO_CLOCK_TIME(frames, rate) \
-  ((GstClockTime) gst_util_uint64_scale (frames, GST_SECOND, rate))
+  ((GstClockTime) gst_util_uint64_scale_round (frames, GST_SECOND, rate))
 
 /**
  * GST_CLOCK_TIME_TO_FRAMES:
@@ -68,7 +68,7 @@ G_BEGIN_DECLS
  * Calculate frames from @clocktime and sample @rate.
  */
 #define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate) \
-  gst_util_uint64_scale (clocktime, rate, GST_SECOND)
+  gst_util_uint64_scale_round (clocktime, rate, GST_SECOND)
 
 /**
  * GST_AUDIO_DEF_RATE: