[vlc-devel] commit: variables: Inherit path is now parent->libvlc->saved config ( Derk-Jan Hartman )
git version control
git at videolan.org
Fri Sep 19 14:18:40 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Fri Sep 19 14:09:18 2008 +0200| [45e43037a961531a28444d969f903c18929b06b9] | committer: Derk-Jan Hartman
variables: Inherit path is now parent->libvlc->saved config
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45e43037a961531a28444d969f903c18929b06b9
---
src/misc/variables.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 3efa7fc..bee65c4 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -1456,11 +1456,12 @@ static int InheritValue( vlc_object_t *p_this, const char *psz_name,
{
int i_var;
variable_t *p_var;
+ vlc_object_internals_t *p_priv;
/* No need to take the structure lock,
* we are only looking for our parents */
- if( !p_this->p_parent )
+ if( !p_this->p_parent && !p_this->p_libvlc )
{
switch( i_type & VLC_VAR_TYPE )
{
@@ -1518,7 +1519,10 @@ static int InheritValue( vlc_object_t *p_this, const char *psz_name,
return VLC_SUCCESS;
}
- vlc_object_internals_t *p_priv = vlc_internals( p_this->p_parent );
+ if( !p_this->p_parent )
+ p_priv = vlc_internals( p_this->p_libvlc );
+ else
+ p_priv = vlc_internals( p_this->p_parent );
/* Look for the variable */
vlc_mutex_lock( &p_priv->var_lock );
More information about the vlc-devel
mailing list