# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_access.h>
#include "vcd.h"
-#include <vlc_playlist.h>
#include <vlc_keys.h>
#include "info.h"
if ( CDIO_INVALID_TRACK != i_track )
{
+ char* psz_title_format = config_GetPsz( p_access, MODULE_STRING "-title-format" );
char *psz_name =
- VCDFormatStr( p_access, p_vcdplayer,
- config_GetPsz( p_access, MODULE_STRING "-title-format" ),
- psz_mrl, &(p_vcdplayer->play_item) );
+ VCDFormatStr( p_access, p_vcdplayer, psz_title_format, psz_mrl,
+ &(p_vcdplayer->play_item) );
+ free( psz_title_format );
input_Control( p_vcdplayer->p_input, INPUT_SET_NAME, psz_name );
}
if( psz_mrl )
{
char *psz_name;
- snprintf(psz_mrl, psz_mrl_max, "%s%s",
- VCD_MRL_PREFIX, p_vcdplayer->psz_source);
- psz_name = VCDFormatStr( p_access, p_vcdplayer,
- config_GetPsz( p_access, MODULE_STRING
- "-title-format" ),
- psz_mrl, &(p_vcdplayer->play_item) );
- input_Control( p_vcdplayer->p_input, INPUT_SET_NAME, psz_name );
- free(psz_mrl);
+ char* psz_title_format = config_GetPsz( p_access, MODULE_STRING "-title-format" )
+ snprintf( psz_mrl, psz_mrl_max, "%s%s",
+ VCD_MRL_PREFIX, p_vcdplayer->psz_source );
+ psz_name = VCDFormatStr( p_access, p_vcdplayer, psz_title_format, psz_mrl,
+ &(p_vcdplayer->play_item) );
+ input_Control( p_vcdplayer->p_input, INPUT_SET_NAME, psz_name );
+ free( psz_title_format );
+ free(psz_mrl);
}
}