mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
test: use gst_util_uint64_scale_round() for timestamp to sample calculation
This commit is contained in:
parent
65ff17660b
commit
4459088c6d
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ sample_to_nanotime (guint sample)
|
||||||
static guint
|
static guint
|
||||||
nanotime_to_sample (GstClockTime nanotime)
|
nanotime_to_sample (GstClockTime nanotime)
|
||||||
{
|
{
|
||||||
return nanotime * SAMPLE_FREQ / GST_SECOND;
|
return gst_util_uint64_scale_round (nanotime, SAMPLE_FREQ, GST_SECOND);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstBuffer *
|
static GstBuffer *
|
||||||
|
|
Loading…
Reference in a new issue