mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
gst: Call priv_gst_clock_init() on DllMain
Can avoid atomic read per gst_util_get_timestamp() call Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4794>
This commit is contained in:
parent
b291efe44b
commit
c79649b6ec
2 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue