summaryrefslogtreecommitdiff
path: root/sys/decklink
diff options
context:
space:
mode:
authorTakeshi Sato <t-sato@bx.jp.nec.co.jp>2018-03-27 12:24:30 +0900
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-27 12:04:05 +0530
commitbeab2ee4dca1edc286469710d16cfdfaa742734e (patch)
treea6942dc44f1d08ae6c51cb47ec596bd54bfd8e9c /sys/decklink
parenta08d333e56424d2135fee4b22d06097235f05117 (diff)
decklink: fix initialization fails in windows binary
There is no log of gst_decklink_com_thread () which initializes COM. The initialization part is not valid with #ifdef MSC_VER. Windows binaries are built with gcc. As with other codes, it was avoidable by setting it to G_OS_WIN32 instead of MSC_VER. https://bugzilla.gnome.org/show_bug.cgi?id=794652
Diffstat (limited to 'sys/decklink')
-rw-r--r--sys/decklink/gstdecklink.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
index e1f91ba25..b08ae4863 100644
--- a/sys/decklink/gstdecklink.cpp
+++ b/sys/decklink/gstdecklink.cpp
@@ -1065,7 +1065,7 @@ public:
}
};
-#ifdef _MSC_VER
+#ifdef G_OS_WIN32
/* FIXME: We currently never deinit this */
static GMutex com_init_lock;
@@ -1114,7 +1114,7 @@ gst_decklink_com_thread (gpointer data)
return NULL;
}
-#endif /* _MSC_VER */
+#endif /* G_OS_WIN32 */
static GOnce devices_once = G_ONCE_INIT;
static GPtrArray *devices; /* array of Device */
@@ -1127,7 +1127,7 @@ init_devices (gpointer data)
HRESULT ret;
int i;
-#ifdef _MSC_VER
+#ifdef G_OS_WIN32
// Start COM thread for Windows
g_mutex_lock (&com_init_lock);
@@ -1138,7 +1138,7 @@ init_devices (gpointer data)
/* wait until the COM thread signals that COM has been initialized */
g_cond_wait (&com_init_cond, &com_init_lock);
g_mutex_unlock (&com_init_lock);
-#endif /* _MSC_VER */
+#endif /* G_OS_WIN32 */
iterator = CreateDeckLinkIteratorInstance ();
if (iterator == NULL) {