Commit 382188b5 authored by Pierre Ynard's avatar 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
parent 30880f42
...@@ -611,7 +611,7 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data) ...@@ -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) void vlc_timer_destroy (vlc_timer_t *id)
{ {
if (id->handle != INVALID_HANDLE_VALUE) 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, void vlc_timer_schedule (vlc_timer_t *id, bool absolute,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment