* 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/vlc.h>
#include <vlc_playlist.h>
-#include <vlc_item.h>
+#include <vlc_input.h>
#include <vlc_interface.h>
#ifdef HAVE_UNISTD_H
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;
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