Commit bb37f1c4 authored by Rémi Duraffort's avatar Rémi Duraffort

telepathy: compute test only one time

(and strlen("item-current") == 12)
parent 441e2609
......@@ -173,9 +173,10 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
playlist_t* p_playlist = (playlist_t*) p_this;
char *psz_buf = NULL;
input_thread_t *p_input;
bool b_is_item_current = !strncmp( "item-current", psz_var, 12 );
/* Don't update Telepathy presence each time an item has been preparsed */
if( !strncmp( "item-current", psz_var, 16 ) )
if( b_is_item_current )
{ /* stores the current input item id */
p_intf->p_sys->i_id = newval.i_int;
p_intf->p_sys->i_item_changes = 0;
......@@ -209,7 +210,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
}
}
if( !strncmp( "item-current", psz_var, 16 ) )
if( b_is_item_current )
var_AddCallback( p_input, "state", StateChange, p_intf );
/* We format the string to be displayed */
......
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