]> git.sesse.net Git - vlc/blobdiff - modules/misc/notify/msn.c
Remove most stray semi-colons in module descriptions
[vlc] / modules / misc / notify / msn.c
index 45553ff49b5534ee4ed202d695d6e86034ca9ca3..a609cb452af237a216ec06e041f0cb6c35c53c36 100644 (file)
@@ -68,18 +68,18 @@ static int SendToMSN( const char * psz_msg );
 #define FORMAT_LONGTEXT N_("Format of the string to send to MSN " \
 "{0} Artist, {1} Title, {2} Album. Defaults to \"Artist - Title\" ({0} - {1}).")
 
-vlc_module_begin();
-    set_category( CAT_INTERFACE );
-    set_subcategory( SUBCAT_INTERFACE_CONTROL );
-    set_shortname( "MSN" );
-    set_description( N_("MSN Now-Playing") );
+vlc_module_begin ()
+    set_category( CAT_INTERFACE )
+    set_subcategory( SUBCAT_INTERFACE_CONTROL )
+    set_shortname( "MSN" )
+    set_description( N_("MSN Now-Playing") )
 
     add_string( "msn-format", FORMAT_DEFAULT, NULL,
                 FORMAT_TEXT, FORMAT_LONGTEXT, false );
 
-    set_capability( "interface", 0 );
-    set_callbacks( Open, Close );
-vlc_module_end();
+    set_capability( "interface", 0 )
+    set_callbacks( Open, Close )
+vlc_module_end ()
 
 /*****************************************************************************
  * Open: initialize and create stuff
@@ -99,7 +99,7 @@ static int Open( vlc_object_t *p_this )
     }
     msg_Dbg( p_intf, "using format: %s", p_intf->p_sys->psz_format );
 
-    p_playlist = pl_Yield( p_intf );
+    p_playlist = pl_Hold( p_intf );
     var_AddCallback( p_playlist, "item-change", ItemChange, p_intf );
     var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
     pl_Release( p_intf );
@@ -113,7 +113,7 @@ static int Open( vlc_object_t *p_this )
 static void Close( vlc_object_t *p_this )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_this;
-    playlist_t *p_playlist = pl_Yield( p_this );
+    playlist_t *p_playlist = pl_Hold( p_this );
 
     /* clear the MSN stuff ... else it looks like we're still playing
      * something although VLC (or the MSN plugin) is closed */
@@ -141,14 +141,9 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     char *psz_artist = NULL;
     char *psz_album = NULL;
     char *psz_buf = NULL;
-    input_thread_t *p_input;
-    playlist_t *p_playlist = pl_Yield( p_this );
-
-    p_input = p_playlist->p_input;
-    pl_Release( p_this );
+    input_thread_t *p_input =  playlist_CurrentInput( (playlist_t *) p_this );
 
     if( !p_input ) return VLC_SUCCESS;
-    vlc_object_yield( p_input );
 
     if( p_input->b_dead || !input_GetItem(p_input)->psz_name )
     {