]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/commitdiff
systemclock: fix compilation of win32 code
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 29 Aug 2009 00:44:51 +0000 (04:44 +0400)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sat, 29 Aug 2009 10:32:21 +0000 (11:32 +0100)
Fixes #593460.

gst/gstsystemclock.c

index 2b2ef0b8d5986b96b4c652b1599c015a29cc823f..aa48acf1a9e12beb22d2fe5a5d76c51dc806e760 100644 (file)
@@ -43,6 +43,7 @@
 #include "gstsystemclock.h"
 #include "gstenumtypes.h"
 #include "gstpoll.h"
+#include "gstutils.h"
 
 #include <errno.h>
 
@@ -479,8 +480,9 @@ static GstClockTime
 gst_system_clock_get_internal_time (GstClock * clock)
 {
 #ifdef G_OS_WIN32
-  if (clock->priv->frequency.QuadPart != 0) {
-    GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
+  GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
+
+  if (sysclock->priv->frequency.QuadPart != 0) {
     LARGE_INTEGER now;
 
     /* we prefer the highly accurate performance counters on windows */
@@ -518,7 +520,9 @@ static guint64
 gst_system_clock_get_resolution (GstClock * clock)
 {
 #ifdef G_OS_WIN32
-  if (clock->priv->frequency.QuadPart != 0) {
+  GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
+
+  if (sysclock->priv->frequency.QuadPart != 0) {
     return GST_SECOND / sysclock->priv->frequency.QuadPart;
   } else
 #endif /* G_OS_WIN32 */