X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fcdda.c;h=75b8cc0d2f32d4645958ff84f4873ad1f42cfc40;hb=2e847d8484163b50d8fe98350f3dc96ac8a1a43f;hp=8466c7449e54bb165a66721009a06b6ad1ed1afa;hpb=e4990aba70777b8382f0b0392c02c798d35885ad;p=vlc diff --git a/modules/access/cdda.c b/modules/access/cdda.c index 8466c7449e..75b8cc0d2f 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -35,6 +35,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include #include #include @@ -119,7 +120,7 @@ struct access_sys_t }; static block_t *Block( access_t * ); -static int Seek( access_t *, int64_t ); +static int Seek( access_t *, uint64_t ); static int Control( access_t *, int, va_list ); static int GetTracks( access_t *p_access, input_item_t *p_current ); @@ -321,12 +322,13 @@ static block_t *Block( access_t *p_access ) /**************************************************************************** * Seek ****************************************************************************/ -static int Seek( access_t *p_access, int64_t i_pos ) +static int Seek( access_t *p_access, uint64_t i_pos ) { access_sys_t *p_sys = p_access->p_sys; /* Next sector to read */ p_sys->i_sector = p_sys->i_first_sector + i_pos / CDDA_DATA_SIZE; + assert( p_sys->i_sector >= 0 ); p_access->info.i_pos = i_pos; return VLC_SUCCESS; @@ -612,11 +614,14 @@ static cddb_disc_t *GetCDDBInfo( access_t *p_access, int i_titles, int *p_sector } /* */ - char *psz_tmp = config_GetPsz( p_access, "cddb-server" ); - cddb_set_server_name( p_cddb, psz_tmp ); - free( psz_tmp ); + char *psz_tmp = var_InheritString( p_access, "cddb-server" ); + if( psz_tmp ) + { + cddb_set_server_name( p_cddb, psz_tmp ); + free( psz_tmp ); + } - cddb_set_server_port( p_cddb, config_GetInt( p_access, "cddb-port" ) ); + cddb_set_server_port( p_cddb, var_InheritInteger( p_access, "cddb-port" ) ); cddb_set_email_address( p_cddb, "vlc@videolan.org" ); @@ -624,7 +629,7 @@ static cddb_disc_t *GetCDDBInfo( access_t *p_access, int i_titles, int *p_sector cddb_cache_disable( p_cddb ); // cddb_cache_set_dir( p_cddb, -// config_GetPsz( p_access, +// var_InheritString( p_access, // MODULE_STRING "-cddb-cachedir") ); cddb_set_timeout( p_cddb, 10 );