Commit 5277ffe2 authored by Rafaël Carré's avatar Rafaël Carré

Keeps vout-filter when activating extended gui

(fixes #789)
parent 09f219d7
......@@ -1050,9 +1050,19 @@ static void ChangeVFiltersString( intf_thread_t *p_intf,
vout_thread_t *p_vout;
char *psz_parser, *psz_string;
psz_string = config_GetPsz( p_intf, "vout-filter" );
/* first, look if a vout-filter has been set at runtime */
p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
psz_string = ( p_vout ) ?
var_GetString( p_vout, "vout-filter" ) : strdup("");
if( !psz_string ) psz_string = strdup("");
/* else, look if vout-filter has been set in the config */
if( !*psz_string )
{
free( psz_string );
psz_string = config_GetPsz( p_intf, "vout-filter" );
if( !psz_string ) psz_string = strdup("");
}
psz_parser = strstr( psz_string, psz_name );
......@@ -1067,6 +1077,7 @@ static void ChangeVFiltersString( intf_thread_t *p_intf,
}
else
{
if( p_vout ) vlc_object_release( p_vout );
return;
}
}
......@@ -1083,19 +1094,18 @@ static void ChangeVFiltersString( intf_thread_t *p_intf,
{
*(psz_string+strlen(psz_string ) -1 ) = '\0';
}
}
else
{
free( psz_string );
return;
}
}
else
{
if( p_vout ) vlc_object_release( p_vout );
free( psz_string );
return;
}
}
/* Vout is not kept, so put that in the config */
config_PutPsz( p_intf, "vout-filter", psz_string );
/* Try to set on the fly */
p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( p_vout )
{
var_SetString( p_vout, "vout-filter", psz_string );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment