# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <assert.h>
/* Needed by str_format_time */
{
char buffer[255];
time_t curtime;
-#if defined(HAVE_LOCALTIME_R)
struct tm loctime;
-#else
- struct tm *loctime;
-#endif
/* Get the current time. */
curtime = time( NULL );
/* Convert it to local time representation. */
-#if defined(HAVE_LOCALTIME_R)
localtime_r( &curtime, &loctime );
strftime( buffer, 255, tformat, &loctime );
-#else
- loctime = localtime( &curtime );
- strftime( buffer, 255, tformat, loctime );
-#endif
return strdup( buffer );
}
int b_empty_if_na = 0;
char buf[10];
int i_size = strlen( string ) + 1; /* +1 to store '\0' */
- char *dst = malloc( i_size );
+ char *dst = strdup( string );
+ if( !dst ) return NULL;
int d = 0;
playlist_t *p_playlist = pl_Yield( p_object );
- input_thread_t *p_input = p_playlist->p_input;
+ input_thread_t *p_input = playlist_CurrentInput( p_playlist );
input_item_t *p_item = NULL;
pl_Release( p_object );
if( p_input )
{
- vlc_object_yield( p_input );
p_item = input_GetItem(p_input);
}
- sprintf( dst, string );
-
while( *s )
{
if( b_is_format )