From: Sebastian Dröge Date: Mon, 9 Mar 2020 13:16:00 +0000 (+0200) Subject: systemclock: Don't divide by zero on Windows if high performance timers are not available X-Git-Tag: 1.19.3~982 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=daf7df28dd72ffa0355f9c9518bc21dfb289c35c;p=platform%2Fupstream%2Fgstreamer.git systemclock: Don't divide by zero on Windows if high performance timers are not available --- diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c index adfc117..e80f3ef 100644 --- a/gst/gstsystemclock.c +++ b/gst/gstsystemclock.c @@ -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__