[vlc-devel] commit: telepathy: compute test only one time ( Rémi Duraffort )
git version control
git at videolan.org
Wed Feb 25 19:47:51 CET 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Feb 25 13:25:29 2009 +0100| [bb37f1c4a1164f0d993d2bb890ceb8763552948a] | committer: Rémi Duraffort
telepathy: compute test only one time
(and strlen("item-current") == 12)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb37f1c4a1164f0d993d2bb890ceb8763552948a
---
modules/misc/notify/telepathy.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/misc/notify/telepathy.c b/modules/misc/notify/telepathy.c
index a18687e..d3e407c 100644
--- a/modules/misc/notify/telepathy.c
+++ b/modules/misc/notify/telepathy.c
@@ -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 */
More information about the vlc-devel
mailing list