X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fwin32%2Fthread.c;h=1d25b90320dcbb061e7f5e3d37aad0a93e8a2283;hb=bc09c365ab435fda0185e60a423f69d6dfa348c8;hp=b2e939d0f3193034053faab0fe453792c37a1868;hpb=99f71e5a62fdd14b031fdc89f452d873e3509c74;p=vlc diff --git a/src/win32/thread.c b/src/win32/thread.c index b2e939d0f3..1d25b90320 100644 --- a/src/win32/thread.c +++ b/src/win32/thread.c @@ -553,15 +553,7 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data, goto error; } - /* Thread closes the handle when exiting, duplicate it here - * to be on the safe side when joining. */ - if (!DuplicateHandle (GetCurrentProcess (), hThread, - GetCurrentProcess (), p_handle, 0, FALSE, - DUPLICATE_SAME_ACCESS)) - { - CloseHandle (hThread); - goto error; - } + *p_handle = hThread; #else vlc_thread_t th = malloc (sizeof (*th));