Commit 2444a87b authored by Rafaël Carré's avatar Rafaël Carré

Use libcdio namespace, and only if available

Manually picked from [f2fe0dac]
[ae8638cb]
and [4bacba8c]
parent 5004e165
......@@ -737,14 +737,14 @@ CDDAOpen( vlc_object_t *p_this )
char *psz_paranoia = config_GetPsz( p_access,
MODULE_STRING "-paranoia" );
p_cdda->e_paranoia = paranoia_none;
p_cdda->e_paranoia = PARANOIA_MODE_DISABLE;
if( psz_paranoia && *psz_paranoia )
{
if( !strncmp( psz_paranoia, "full", strlen("full") ) )
p_cdda->e_paranoia = paranoia_full;
p_cdda->e_paranoia = PARANOIA_MODE_FULL;
else if( !strncmp( psz_paranoia, "overlap", strlen("overlap") ) )
p_cdda->e_paranoia = paranoia_overlap;
p_cdda->e_paranoia = PARANOIA_MODE_OVERLAP;
/* Use CD Paranoia? */
if ( p_cdda->e_paranoia ) {
......@@ -755,7 +755,7 @@ CDDAOpen( vlc_object_t *p_this )
if ( 0 != cdio_cddap_open(p_cdda->paranoia_cd) ) {
msg_Warn( p_cdda_input, "unable to get paranoia support - "
"continuing without it." );
p_cdda->e_paranoia = paranoia_none;
p_cdda->e_paranoia = PARANOIA_MODE_DISABLE;
} else {
p_cdda->paranoia = cdio_paranoia_init(p_cdda->paranoia_cd);
cdio_paranoia_seek(p_cdda->paranoia, p_cdda->i_lsn, SEEK_SET);
......@@ -763,7 +763,7 @@ CDDAOpen( vlc_object_t *p_this )
/* Set reading mode for full or overlap paranoia,
but allow skipping sectors. */
cdio_paranoia_modeset(p_cdda->paranoia,
paranoia_full == p_cdda->e_paranoia ?
PARANOIA_MODE_FULL == p_cdda->e_paranoia ?
PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP :
PARANOIA_MODE_OVERLAP^PARANOIA_MODE_NEVERSKIP
);
......
......@@ -71,13 +71,6 @@
#define CdIo_t CdIo
#endif
typedef enum {
paranoia_none = 0, /* Note: We make use of 0 as being the same as false */
paranoia_overlap = 1,
paranoia_full = 2
} paranoia_mode_t;
/*****************************************************************************
* cdda_data_t: CD audio information
*****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment