Commit 6dfc0270 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

audio: Use rounding scaling functions for GST_CLOCK_TIME_TO_FRAMES and _FRAMES_TO_CLOCK_TIME

Fixes bug #607381.
parent 125f7dfd
...@@ -58,7 +58,7 @@ G_BEGIN_DECLS ...@@ -58,7 +58,7 @@ G_BEGIN_DECLS
* Calculate clocktime from sample @frames and @rate. * Calculate clocktime from sample @frames and @rate.
*/ */
#define GST_FRAMES_TO_CLOCK_TIME(frames, 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: * GST_CLOCK_TIME_TO_FRAMES:
...@@ -68,7 +68,7 @@ G_BEGIN_DECLS ...@@ -68,7 +68,7 @@ G_BEGIN_DECLS
* Calculate frames from @clocktime and sample @rate. * Calculate frames from @clocktime and sample @rate.
*/ */
#define GST_CLOCK_TIME_TO_FRAMES(clocktime, 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: * GST_AUDIO_DEF_RATE:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment