Commit a9a9981e authored by Christophe Massiot's avatar Christophe Massiot

* modules/control/http.c: Fixed vlc_set_var() and cosmetics.

parent 7b29b358
......@@ -359,8 +359,8 @@ static void LibavcodecCallback( void *p_opaque, int i_level,
psz_item_name = p_avc->item_name(p_opaque);
psz_new_format = malloc( strlen(psz_format) + strlen(psz_item_name)
+ 16 + 7 );
sprintf( psz_new_format, "%s (%s@0x%p)", psz_format,
+ 18 + 5 );
sprintf( psz_new_format, "%s (%s@%p)", psz_format,
p_avc->item_name(p_opaque), p_opaque );
msg_GenericVa( p_this, i_vlc_level, MODULE_STRING, psz_new_format, va );
free( psz_new_format );
......
......@@ -2978,14 +2978,17 @@ static int HttpCallback( httpd_file_sys_t *p_args,
if( val.i_int == PLAYING_S )
{
sprintf( state, "playing" );
} else if( val.i_int == PAUSE_S )
}
else if( val.i_int == PAUSE_S )
{
sprintf( state, "paused" );
} else
}
else
{
sprintf( state, "stop" );
}
} else
}
else
{
sprintf( position, "%d", 0 );
sprintf( time, "%d", 0 );
......@@ -3758,21 +3761,23 @@ static void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
{
i_type = var_Type( p_sys->p_input, psz_variable );
if( i_type == VLC_VAR_INTEGER )
if( (i_type & VLC_VAR_TYPE) == VLC_VAR_INTEGER )
{
int i_value = SSPopN( st, vars );
val.i_int = i_value;
msg_Dbg( p_intf, "requested input var change: %s->%d",
psz_variable, i_value );
}
else
{
psz_value = SSPop( st );
val.psz_string = psz_value;
msg_Dbg( p_intf, "requested input var change: %s->%s",
psz_variable, psz_value );
}
var_Set( p_sys->p_input, psz_variable, val );
}
msg_Dbg( p_intf, "requested input var change: %s->%s",
psz_variable, psz_value );
if( psz_value != NULL )
free( psz_value );
free( psz_variable );
......
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