X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fvcdx%2Finfo.c;h=dc0ec98ba54cb62dbe46ca8149e2016e753109e4;hb=31a163942d6682ae31679e6e2be898f9314b2cc0;hp=79ef1f2ab319bc57937deee05587c3d40ea8aeae;hpb=75a1834d394b6a89a6ead139d57c097704d3943a;p=vlc diff --git a/modules/access/vcdx/info.c b/modules/access/vcdx/info.c index 79ef1f2ab3..dc0ec98ba5 100644 --- a/modules/access/vcdx/info.c +++ b/modules/access/vcdx/info.c @@ -175,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 ); } @@ -385,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); } }