[vlc-devel] commit: Win32: wait for timer callbacks to complete when destroying timer ( Pierre Ynard )

git version control git at videolan.org
Thu Jul 30 11:24:01 CEST 2009


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Jul 30 11:16:15 2009 +0200| [382188b552f713fc2f12621b6c3ef5d39dacf216] | committer: Pierre Ynard 

Win32: wait for timer callbacks to complete when destroying timer

Or else a timer callback might still be running when the caller frees
its resources, which is bad

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=382188b552f713fc2f12621b6c3ef5d39dacf216
---

 src/misc/w32thread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/misc/w32thread.c b/src/misc/w32thread.c
index a2ef9ec..b369733 100644
--- a/src/misc/w32thread.c
+++ b/src/misc/w32thread.c
@@ -611,7 +611,7 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
 void vlc_timer_destroy (vlc_timer_t *id)
 {
     if (id->handle != INVALID_HANDLE_VALUE)
-        DeleteTimerQueueTimer (NULL, id->handle, NULL);
+        DeleteTimerQueueTimer (NULL, id->handle, INVALID_HANDLE_VALUE);
 }
 
 void vlc_timer_schedule (vlc_timer_t *id, bool absolute,




More information about the vlc-devel mailing list