[vlc-commits] commit: Fixed vout display key event thread destruction. (Laurent Aimar )
git at videolan.org
git at videolan.org
Sun May 30 15:02:19 CEST 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun May 30 15:01:17 2010 +0200| [ed4a1d9a9722a65bbf9b61a1b99d150a42f7b9b5] | committer: Laurent Aimar
Fixed vout display key event thread destruction.
block_FifoWake does not work as I thought.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed4a1d9a9722a65bbf9b61a1b99d150a42f7b9b5
---
src/video_output/display.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index bbc6010..1c1d3f4 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -551,13 +551,15 @@ static void *VoutDisplayEventKeyDispatch(void *data)
for (;;) {
block_t *event = block_FifoGet(osys->event.fifo);
- if (!event)
- return NULL;
+
+ int cancel = vlc_savecancel();
int key;
memcpy(&key, event->p_buffer, sizeof(key));
vout_SendEventKey(osys->vout, key);
block_Release(event);
+
+ vlc_restorecancel(cancel);
}
}
@@ -1278,8 +1280,7 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state)
SplitterClose(vd);
vout_display_Delete(vd);
if (osys->event.fifo) {
- block_FifoWake(osys->event.fifo);
- vlc_join(osys->event.thread, NULL);
+ vlc_cancel(osys->event.thread);
block_FifoRelease(osys->event.fifo);
}
vlc_mutex_destroy(&osys->lock);
More information about the vlc-commits
mailing list