Commit 1a912ab7 authored by Laurent Aimar's avatar Laurent Aimar

Correctly update "title %2i" variable.

It is a partial revert of [a8c9c25d]
parent ef8b5bf3
......@@ -149,10 +149,16 @@ void input_SendEventSeekpoint( input_thread_t *p_input, int i_title, int i_seekp
{
vlc_value_t val;
VLC_UNUSED( i_title );
/* "chapter" */
val.i_int = i_seekpoint;
var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val, NULL );
/* "title %2i" */
char psz_title[10];
snprintf( psz_title, sizeof(psz_title), "title %2i", i_title );
var_Change( p_input, psz_title, VLC_VAR_SETVALUE, &val, NULL );
/* */
Trigger( p_input, INPUT_EVENT_CHAPTER );
}
......
......@@ -711,16 +711,6 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
else
{
input_ControlPush( p_input, INPUT_CONTROL_SET_SEEKPOINT, &newval );
val.i_int = newval.i_int;
}
/* Actualize "title %2i" variable */
if( val.i_int >= 0 && val.i_int < count.i_int )
{
int i_title = var_GetInteger( p_input, "title" );
char psz_titlevar[10] = {0};
snprintf( psz_titlevar, 10, "title %2i", i_title );
var_Change( p_input, psz_titlevar, VLC_VAR_SETVALUE, &val, NULL );
}
return VLC_SUCCESS;
......
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