#include "cdda.h" /* private structures. Also #includes vlc things */
#include "info.h" /* headers for meta info retrieval */
#include "access.h"
-#include <vlc_playlist.h> /* Has to come *after* cdda.h */
#include "vlc_keys.h"
#include <vlc_interface.h>
/* Return only the dummy RIFF header we created in Open/Init */
p_block = block_New( p_access, sizeof( WAVEHEADER ) );
memcpy( p_block->p_buffer, &p_cdda->waveheader, sizeof(WAVEHEADER) );
- p_cdda->b_header = VLC_TRUE;
+ p_cdda->b_header = true;
return p_block;
}
if( go_on )
{
dbg_print( (INPUT_DBG_LSN), "EOF");
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return NULL;
}
{
msg_Err( p_access, "cannot get a new block of size: %i",
i_blocks * CDIO_CD_FRAMESIZE_RAW );
- intf_UserFatal( p_access, VLC_FALSE, _("CD reading failed"),
+ intf_UserFatal( p_access, false, _("CD reading failed"),
_("VLC could not get a new block of size: %i."),
i_blocks * CDIO_CD_FRAMESIZE_RAW );
return NULL;
msg_Err( p_access, "%s%s\n", psz_mes ? psz_mes: "",
psz_err ? psz_err: "" );
- if( psz_err ) free( psz_err );
- if( psz_mes ) free( psz_mes );
+ free( psz_err );
+ free( psz_mes );
if( !p_readbuf )
{
msg_Err( p_access, "paranoia read error on frame %i\n",
if( p_cdda->i_track >= p_cdda->i_first_track + p_cdda->i_titles - 1 )
{
dbg_print( (INPUT_DBG_LSN), "EOF");
- p_access->info.b_eof = VLC_TRUE;
+ p_access->info.b_eof = true;
return 0;
}
p_access->info.i_update |= INPUT_UPDATE_TITLE;
{
char *psz_title = CDDAFormatTitle( p_access, p_cdda->i_track );
input_Control( p_cdda->p_input, INPUT_SET_NAME, psz_title );
- free(psz_title);
+ free( psz_title );
}
else
{
}
p_access->info.i_pos = i_pos;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
return VLC_SUCCESS;
}
cdda_data_t *p_cdda = NULL;
CdIo_t *p_cdio;
track_t i_track = 1;
- vlc_bool_t b_single_track = false;
+ bool b_single_track = false;
int i_rc = VLC_EGENERIC;
p_access->p_sys = NULL;
psz_source = var_CreateGetString( p_this, "cd-audio" );
if( !psz_source || !*psz_source )
{
+ free( psz_source );
/* Scan for a CD-ROM drive with a CD-DA in it. */
char **ppsz_drives =
cdio_get_devices_with_cap( NULL, CDIO_FS_AUDIO, false );
if( !(p_cdio = cdio_open( psz_source, DRIVER_UNKNOWN )) )
{
msg_Warn( p_access, "could not open %s", psz_source );
- if ( psz_source )
- free( psz_source );
+ free( psz_source );
return VLC_EGENERIC;
}
p_cdda = calloc( 1, sizeof(cdda_data_t) );
if( p_cdda == NULL )
{
- msg_Err( p_access, "out of memory" );
free( psz_source );
return VLC_ENOMEM;
}
#endif
p_cdda->psz_source = strdup( psz_source );
- p_cdda->b_header = VLC_FALSE;
+ p_cdda->b_header = false;
p_cdda->p_cdio = p_cdio;
p_cdda->i_tracks = 0;
p_cdda->i_titles = 0;
}
p_access->info.i_update = 0;
- p_access->info.b_eof = VLC_FALSE;
+ p_access->info.b_eof = false;
p_access->info.i_title = 0;
p_access->info.i_seekpoint = 0;
}
}
}
+ free( psz_paranoia );
}
#endif
error:
cdio_destroy( p_cdda->p_cdio );
- if( psz_source) free( psz_source );
+ free( psz_source );
if( p_cdda )
{
if ( p_cdda->p_input )
cdio_cddap_close_no_free_cdio( p_cdda->paranoia_cd );
#endif
- if( p_cdda->psz_mcn ) free( p_cdda->psz_mcn );
- if( p_cdda->psz_source ) free( p_cdda->psz_source );
+ free( p_cdda->psz_mcn );
+ free( p_cdda->psz_source );
#if LIBCDDB_VERSION_NUM >= 1
libcddb_shutdown();
case ACCESS_CAN_CONTROL_PACE:
{
- vlc_bool_t *pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = p_cdda->b_audio_ctl ? VLC_FALSE : VLC_TRUE;
+ bool *pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = p_cdda->b_audio_ctl ? false : true;
dbg_print( INPUT_DBG_META, "can control pace? %d", *pb_bool);
return VLC_SUCCESS;
}
dbg_print( INPUT_DBG_META, "can pause?");
common:
{
- vlc_bool_t *pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
- *pb_bool = VLC_TRUE;
+ bool *pb_bool = (bool*)va_arg( args, bool* );
+ *pb_bool = true;
return VLC_SUCCESS;
}
char *psz_title = CDDAFormatTitle( p_access, i_track );
input_Control( p_cdda->p_input, INPUT_SET_NAME,
psz_title );
- free(psz_title);
+ free( psz_title );
p_cdda->i_track = i_track;
i_last_lsn = cdio_get_track_lsn( p_cdda->p_cdio,
CDIO_CDROM_LEADOUT_TRACK );