vlc | branch: master | Petri Hintukainen <[email protected]> | Fri Dec 11 15:00:28 2015 +0200| [dcc738d572096bd817718af7193b73c7b82e2914] | committer: Jean-Baptiste Kempf
bluray: register mouse callbacks only once Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dcc738d572096bd817718af7193b73c7b82e2914 --- modules/access/bluray.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/access/bluray.c b/modules/access/bluray.c index c1c5f5a..a2f276d 100644 --- a/modules/access/bluray.c +++ b/modules/access/bluray.c @@ -2083,8 +2083,13 @@ static void blurayHandleOverlays(demux_t *p_demux, int nread) bool display = ov->status == ToDisplay; vlc_mutex_unlock(&ov->lock); if (display) { - if (p_sys->p_vout == NULL) + if (p_sys->p_vout == NULL) { p_sys->p_vout = input_GetVout(p_demux->p_input); + if (p_sys->p_vout != NULL) { + var_AddCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux); + var_AddCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux); + } + } /* NOTE: we might want to enable background video always when there's no video stream playing. Now, with some discs, there are perioids (even seconds) during which the video window @@ -2101,8 +2106,6 @@ static void blurayHandleOverlays(demux_t *p_demux, int nread) } if (p_sys->p_vout != NULL) { - var_AddCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux); - var_AddCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux); bluraySendOverlayToVout(p_demux, ov); } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
