Commit ed4a1d9a authored by Laurent Aimar's avatar Laurent Aimar

Fixed vout display key event thread destruction.

block_FifoWake does not work as I thought.
parent 631ebd4e
...@@ -551,13 +551,15 @@ static void *VoutDisplayEventKeyDispatch(void *data) ...@@ -551,13 +551,15 @@ static void *VoutDisplayEventKeyDispatch(void *data)
for (;;) { for (;;) {
block_t *event = block_FifoGet(osys->event.fifo); block_t *event = block_FifoGet(osys->event.fifo);
if (!event)
return NULL; int cancel = vlc_savecancel();
int key; int key;
memcpy(&key, event->p_buffer, sizeof(key)); memcpy(&key, event->p_buffer, sizeof(key));
vout_SendEventKey(osys->vout, key); vout_SendEventKey(osys->vout, key);
block_Release(event); block_Release(event);
vlc_restorecancel(cancel);
} }
} }
...@@ -1278,8 +1280,7 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state) ...@@ -1278,8 +1280,7 @@ void vout_DeleteDisplay(vout_display_t *vd, vout_display_state_t *state)
SplitterClose(vd); SplitterClose(vd);
vout_display_Delete(vd); vout_display_Delete(vd);
if (osys->event.fifo) { if (osys->event.fifo) {
block_FifoWake(osys->event.fifo); vlc_cancel(osys->event.thread);
vlc_join(osys->event.thread, NULL);
block_FifoRelease(osys->event.fifo); block_FifoRelease(osys->event.fifo);
} }
vlc_mutex_destroy(&osys->lock); vlc_mutex_destroy(&osys->lock);
......
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