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, ...@@ -1050,9 +1050,19 @@ static void ChangeVFiltersString( intf_thread_t *p_intf,
vout_thread_t *p_vout; vout_thread_t *p_vout;
char *psz_parser, *psz_string; 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 ); psz_parser = strstr( psz_string, psz_name );
...@@ -1067,6 +1077,7 @@ static void ChangeVFiltersString( intf_thread_t *p_intf, ...@@ -1067,6 +1077,7 @@ static void ChangeVFiltersString( intf_thread_t *p_intf,
} }
else else
{ {
if( p_vout ) vlc_object_release( p_vout );
return; return;
} }
} }
...@@ -1083,19 +1094,18 @@ static void ChangeVFiltersString( intf_thread_t *p_intf, ...@@ -1083,19 +1094,18 @@ static void ChangeVFiltersString( intf_thread_t *p_intf,
{ {
*(psz_string+strlen(psz_string ) -1 ) = '\0'; *(psz_string+strlen(psz_string ) -1 ) = '\0';
} }
} }
else else
{ {
free( psz_string ); if( p_vout ) vlc_object_release( p_vout );
return; free( psz_string );
} return;
}
} }
/* Vout is not kept, so put that in the config */ /* Vout is not kept, so put that in the config */
config_PutPsz( p_intf, "vout-filter", psz_string ); config_PutPsz( p_intf, "vout-filter", psz_string );
/* Try to set on the fly */ /* Try to set on the fly */
p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( p_vout ) if( p_vout )
{ {
var_SetString( p_vout, "vout-filter", psz_string ); 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