[vlc-devel] [PATCH 6/7] display: protect the display object while it's being used in the Event thread
Steve Lhomme
robux4 at ycbcr.xyz
Fri Aug 17 11:27:09 CEST 2018
---
src/video_output/display.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 2bfc5b1547..fa64d38bbc 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1309,8 +1309,16 @@ void vout_SendDisplayEventMouse(vout_thread_t *vout, const vlc_mouse_t *m)
vlc_mouse_t tmp1, tmp2;
/* The check on spu is needed as long as ALLOW_DUMMY_VOUT is defined */
- if (vout->p->spu && spu_ProcessMouse( vout->p->spu, m, &vout->p->display.vd->source))
- return;
+ if (vout->p->spu)
+ {
+ vlc_mutex_lock(&vout->p->display.lock);
+ if (spu_ProcessMouse( vout->p->spu, m, &vout->p->display.vd->source))
+ {
+ vlc_mutex_unlock(&vout->p->display.lock);
+ return;
+ }
+ vlc_mutex_unlock(&vout->p->display.lock);
+ }
vlc_mutex_lock( &vout->p->filter.lock );
if (vout->p->filter.chain_static && vout->p->filter.chain_interactive) {
--
2.17.0
More information about the vlc-devel
mailing list