* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#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 );
}
strncat(tp, str, TEMP_STR_LEN-(tp-temp_str)); \
tp += len; \
} \
- saw_control_prefix = VLC_FALSE; \
+ saw_control_prefix = false; \
} \
}
strncat(tp, num_str, TEMP_STR_LEN-(tp-temp_str)); \
tp += len; \
} \
- saw_control_prefix = VLC_FALSE; \
+ saw_control_prefix = false; \
}
/*!
static char temp_str[TEMP_STR_SIZE];
size_t i;
char * tp = temp_str;
- vlc_bool_t saw_control_prefix = VLC_FALSE;
+ bool saw_control_prefix = false;
size_t format_len = strlen(format_str);
memset(temp_str, 0, TEMP_STR_SIZE);
if (!saw_control_prefix && format_str[i] != '%') {
*tp++ = format_str[i];
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
continue;
}
/* What to do? */
;
}
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
}
break;
strncat(tp, num_str, TEMP_STR_LEN-(tp-temp_str));
tp += strlen(num_str);
}
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
break;
case 'M':
strncat(tp, seg_type_str, TEMP_STR_LEN-(tp-temp_str));
tp += strlen(seg_type_str);
}
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
break;
case 'T':
default:
*tp++ = '%';
*tp++ = format_str[i];
- saw_control_prefix = VLC_FALSE;
+ saw_control_prefix = false;
}
}
return strdup(temp_str);
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);
}
}