[vlc-commits] win32: fix vlc_thread_self() in cancellation handlers
Rémi Denis-Courmont
git at videolan.org
Thu May 26 21:27:57 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 26 22:25:34 2016 +0300| [245bbda768d2b46c5f2aad27f216dc48be779528] | committer: Rémi Denis-Courmont
win32: fix vlc_thread_self() in cancellation handlers
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=245bbda768d2b46c5f2aad27f216dc48be779528
---
src/win32/thread.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/win32/thread.c b/src/win32/thread.c
index 1dbdca6..a2f2380 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -619,11 +619,12 @@ void vlc_testcancel (void)
return;
#endif
+ th->killable = true; /* Do not re-enter cancellation cleanup */
+
for (vlc_cleanup_t *p = th->cleaners; p != NULL; p = p->next)
p->proc (p->data);
th->data = NULL; /* TODO: special value? */
- TlsSetValue(thread_key, NULL);
if (th->id == NULL) /* Detached thread */
free(th);
_endthreadex(0);
More information about the vlc-commits
mailing list