[vlc-devel] commit: vlm object is needed early, store it when it's allocated ( Rafaël Carré )
git version control
git at videolan.org
Tue Nov 3 05:06:13 CET 2009
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Tue Nov 3 05:03:29 2009 +0100| [d24a652d09e2040ee2251c561ac062bd22df8f6a] | committer: Rafaël Carré
vlm object is needed early, store it when it's allocated
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d24a652d09e2040ee2251c561ac062bd22df8f6a
---
src/input/vlm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index bc8157f..185c4b5 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -90,6 +90,7 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
VLC_UNUSED(oldval);
input_thread_t *p_input = (input_thread_t *)p_this;
vlm_t *p_vlm = libvlc_priv( p_input->p_libvlc )->p_vlm;
+ assert( p_vlm );
vlm_media_sys_t *p_media = p_data;
const char *psz_instance_name = NULL;
@@ -159,6 +160,8 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
return NULL;
}
+ *pp_vlm = p_vlm; /* for future reference */
+
/* Load our configuration file */
psz_vlmconf = var_CreateGetString( p_vlm, "vlm-conf" );
if( psz_vlmconf && *psz_vlmconf )
@@ -180,7 +183,6 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
free( psz_vlmconf );
vlc_object_set_destructor( p_vlm, (vlc_destructor_t)vlm_Destructor );
- *pp_vlm = p_vlm; /* for future reference */
vlc_mutex_unlock( lockval.p_address );
return p_vlm;
More information about the vlc-devel
mailing list