mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
audio: Use rounding scaling functions for GST_CLOCK_TIME_TO_FRAMES and _FRAMES_TO_CLOCK_TIME
Fixes bug #607381.
This commit is contained in:
parent
125f7dfdb0
commit
6dfc0270ec
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue