[vlc-commits] bluray: factorize blurayReleaseVout()
Petri Hintukainen
git at videolan.org
Mon Aug 24 11:03:40 CEST 2015
vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Tue Aug 18 14:06:37 2015 +0300| [372d71bd6486edfd82a1558a878e2473c7993f7a] | committer: Jean-Baptiste Kempf
bluray: factorize blurayReleaseVout()
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=372d71bd6486edfd82a1558a878e2473c7993f7a
---
modules/access/bluray.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 73e80b7..5e67ad1 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -270,6 +270,18 @@ static void FindMountPoint(char **file)
#endif
}
+static void blurayReleaseVout(demux_t *p_demux)
+{
+ demux_sys_t *p_sys = p_demux->p_sys;
+
+ if (p_sys->p_vout != NULL) {
+ var_DelCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux);
+ var_DelCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux);
+ vlc_object_release(p_sys->p_vout);
+ p_sys->p_vout = NULL;
+ }
+}
+
/*****************************************************************************
* cache current playlist (title) information
*****************************************************************************/
@@ -486,11 +498,8 @@ static void blurayClose(vlc_object_t *object)
assert(p_sys->bluray);
bd_close(p_sys->bluray);
- if (p_sys->p_vout != NULL) {
- var_DelCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux);
- var_DelCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux);
- vlc_object_release(p_sys->p_vout);
- }
+ blurayReleaseVout(p_demux);
+
if (p_sys->p_parser)
stream_Delete(p_sys->p_parser);
if (p_sys->p_out != NULL)
@@ -784,12 +793,7 @@ static void blurayCloseOverlay(demux_t *p_demux, int plane)
return;
/* All overlays have been closed */
- if (p_sys->p_vout != NULL) {
- var_DelCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux);
- var_DelCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux);
- vlc_object_release(p_sys->p_vout);
- p_sys->p_vout = NULL;
- }
+ blurayReleaseVout(p_demux);
}
/*
More information about the vlc-commits
mailing list