Commit 165f3496 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Logo: expansion safety

parent 59712f39
...@@ -346,11 +346,12 @@ static int Create( vlc_object_t *p_this ) ...@@ -346,11 +346,12 @@ static int Create( vlc_object_t *p_this )
p_sys->pos = var_CreateGetIntegerCommand( p_vout, "logo-position" ); p_sys->pos = var_CreateGetIntegerCommand( p_vout, "logo-position" );
p_sys->posx = var_CreateGetIntegerCommand( p_vout, "logo-x" ); p_sys->posx = var_CreateGetIntegerCommand( p_vout, "logo-x" );
p_sys->posy = var_CreateGetIntegerCommand( p_vout, "logo-y" ); p_sys->posy = var_CreateGetIntegerCommand( p_vout, "logo-y" );
p_logo_list->i_delay = __MAX( __MIN( p_logo_list->i_delay = var_CreateGetIntegerCommand( p_vout, "logo-delay" );
var_CreateGetIntegerCommand( p_vout, "logo-delay" ) , 60000 ), 0 ); p_logo_list->i_delay = __MAX( __MIN( p_logo_list->i_delay, 60000 ), 0 );
p_logo_list->i_repeat = var_CreateGetIntegerCommand( p_vout, "logo-repeat"); p_logo_list->i_repeat = var_CreateGetIntegerCommand( p_vout, "logo-repeat");
p_logo_list->i_alpha = __MAX( __MIN( p_logo_list->i_alpha = var_CreateGetIntegerCommand( p_vout,
var_CreateGetIntegerCommand( p_vout, "logo-transparency" ), 255 ), 0 ); "logo-transparency" );
p_logo_list->i_alpha = __MAX( __MIN( p_logo_list->i_alpha, 255 ), 0 );
LoadLogoList( p_vout, p_logo_list ); LoadLogoList( p_vout, p_logo_list );
...@@ -695,8 +696,9 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -695,8 +696,9 @@ static int CreateFilter( vlc_object_t *p_this )
p_sys->posx = var_CreateGetIntegerCommand( p_filter, "logo-x" ); p_sys->posx = var_CreateGetIntegerCommand( p_filter, "logo-x" );
p_sys->posy = var_CreateGetIntegerCommand( p_filter, "logo-y" ); p_sys->posy = var_CreateGetIntegerCommand( p_filter, "logo-y" );
p_sys->pos = var_CreateGetIntegerCommand( p_filter, "logo-position" ); p_sys->pos = var_CreateGetIntegerCommand( p_filter, "logo-position" );
p_logo_list->i_alpha = __MAX( __MIN( var_CreateGetIntegerCommand( p_logo_list->i_alpha = var_CreateGetIntegerCommand( p_filter,
p_filter, "logo-transparency"), 255 ), 0 ); "logo-transparency");
p_logo_list->i_alpha = __MAX( __MIN( p_logo_list->i_alpha, 255 ), 0 );
p_logo_list->i_delay = p_logo_list->i_delay =
var_CreateGetIntegerCommand( p_filter, "logo-delay" ); var_CreateGetIntegerCommand( p_filter, "logo-delay" );
p_logo_list->i_repeat = p_logo_list->i_repeat =
......
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