diff --git a/subprojects/gstreamer/gst/gst.c b/subprojects/gstreamer/gst/gst.c index f590b7a0a3..2ff100af0d 100644 --- a/subprojects/gstreamer/gst/gst.c +++ b/subprojects/gstreamer/gst/gst.c @@ -213,8 +213,11 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) + if (fdwReason == DLL_PROCESS_ATTACH) { _priv_gst_dll_handle = (HMODULE) hinstDLL; + priv_gst_clock_init (); + } + return TRUE; } diff --git a/subprojects/gstreamer/gst/gstutils.c b/subprojects/gstreamer/gst/gstutils.c index 07dd4633d6..a48c72ee0f 100644 --- a/subprojects/gstreamer/gst/gstutils.c +++ b/subprojects/gstreamer/gst/gstutils.c @@ -3528,7 +3528,11 @@ gst_parse_bin_from_description_full (const gchar * bin_description, GstClockTime gst_util_get_timestamp (void) { +#if defined(G_OS_WIN32) && !defined(GST_STATIC_COMPILATION) + /* priv_gst_clock_init() is called in DllMain */ +#else priv_gst_clock_init (); +#endif return priv_gst_get_monotonic_time (); }