X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fvcdx%2Finfo.c;h=dc0ec98ba54cb62dbe46ca8149e2016e753109e4;hb=31a163942d6682ae31679e6e2be898f9314b2cc0;hp=ca4a9ef89155f1793c958eac64a3f1cd509a7fcb;hpb=df61d33b06e2b3cbbe746b2f5a9bea5b370c24ff;p=vlc diff --git a/modules/access/vcdx/info.c b/modules/access/vcdx/info.c index ca4a9ef891..dc0ec98ba5 100644 --- a/modules/access/vcdx/info.c +++ b/modules/access/vcdx/info.c @@ -25,11 +25,10 @@ # include "config.h" #endif -#include +#include #include #include #include "vcd.h" -#include #include #include "info.h" @@ -176,10 +175,11 @@ VCDMetaInfo( access_t *p_access, /*const*/ char *psz_mrl ) 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 ); } @@ -386,14 +386,14 @@ VCDUpdateTitle( access_t *p_access ) 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); } }