mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
systemclock: Don't divide by zero on Windows if high performance timers are not available
This commit is contained in:
parent
5edc20188a
commit
daf7df28dd
1 changed files with 3 additions and 2 deletions
|
@ -193,10 +193,11 @@ gst_system_clock_init (GstSystemClock * clock)
|
|||
#ifdef G_OS_WIN32
|
||||
QueryPerformanceFrequency (&priv->frequency);
|
||||
/* can be 0 if the hardware does not have hardware support */
|
||||
if (priv->frequency.QuadPart != 0)
|
||||
if (priv->frequency.QuadPart != 0) {
|
||||
/* we take a base time so that time starts from 0 to ease debugging */
|
||||
QueryPerformanceCounter (&priv->start);
|
||||
priv->ratio = GST_SECOND / priv->frequency.QuadPart;
|
||||
priv->ratio = GST_SECOND / priv->frequency.QuadPart;
|
||||
}
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
|
Loading…
Reference in a new issue