]> git.sesse.net Git - vlc/blobdiff - modules/misc/notify/xosd.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / misc / notify / xosd.c
index 43afcec598dcc2eb0038fe6efdad9695cdfd56ee..6c52e704798da4a86ba84bc488da1f334d588533 100644 (file)
@@ -10,7 +10,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
 
 #include <xosd.h>
-
-#include <vlc/intf.h>
+#include <vlc/vlc.h>
+#include <vlc_playlist.h>
+#include <vlc_input.h>
+#include <vlc_interface.h>
 
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>
@@ -213,7 +213,7 @@ static void Run( intf_thread_t *p_intf )
             p_intf->p_sys->b_need_update = VLC_FALSE;
             p_playlist = pl_Yield( p_intf );
 
-            if( !playlist_isEmpty( p_playlist ) )
+            if( playlist_IsEmpty( p_playlist ) )
             {
                 vlc_object_release( p_playlist );
                 continue;
@@ -245,10 +245,11 @@ static void Run( intf_thread_t *p_intf )
 
                 vlc_object_release( p_playlist );
 
-                if( p_input->i_duration != -1 )
+                mtime_t i_duration = input_item_GetDuration( p_input );
+                if( i_duration != -1 )
                 {
                     char psz_durationstr[MSTRTIME_MAX_SIZE];
-                    secstotimestr( psz_durationstr, p_input->i_duration/1000000 );
+                    secstotimestr( psz_durationstr, i_duration / 1000000 );
                     sprintf( psz_duration, "(%s)", psz_durationstr );
                 }
                 else