diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-11-15 13:01:00 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-11-15 13:01:00 +0000 |
commit | 570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b (patch) | |
tree | ed387d71185404d03367e64a52093b0e6369ed67 /src/input/input_cdda.c | |
parent | bb62a769e4a50cef3023408bf9a527e63b7d884d (diff) | |
download | xine-lib-570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b.tar.gz xine-lib-570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b.tar.bz2 |
more helper functions cleanup (stream info, meta info)
CVS patchset: 5731
CVS date: 2003/11/15 13:01:00
Diffstat (limited to 'src/input/input_cdda.c')
-rw-r--r-- | src/input/input_cdda.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index f24950896..b98659819 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.36 2003/10/31 17:28:05 mroi Exp $ + * $Id: input_cdda.c,v 1.37 2003/11/15 13:01:04 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -2406,9 +2406,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Title: %s\n", this->cddb.disc_title); #endif - if(this->stream->meta_info[XINE_META_INFO_ALBUM]) - free(this->stream->meta_info[XINE_META_INFO_ALBUM]); - this->stream->meta_info[XINE_META_INFO_ALBUM] = strdup(this->cddb.disc_title); + xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM, this->cddb.disc_title); } if(this->cddb.track[this->track].title) { @@ -2416,9 +2414,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Track %d Title: %s\n", this->track+1, this->cddb.track[this->track].title); #endif - if(this->stream->meta_info[XINE_META_INFO_TITLE]) - free(this->stream->meta_info[XINE_META_INFO_TITLE]); - this->stream->meta_info[XINE_META_INFO_TITLE] = strdup(this->cddb.track[this->track].title); + xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->cddb.track[this->track].title); } if(this->cddb.disc_artist) { @@ -2426,9 +2422,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Artist: %s\n", this->cddb.disc_artist); #endif - if(this->stream->meta_info[XINE_META_INFO_ARTIST]) - free(this->stream->meta_info[XINE_META_INFO_ARTIST]); - this->stream->meta_info[XINE_META_INFO_ARTIST] = strdup(this->cddb.disc_artist); + xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->cddb.disc_artist); } if(this->cddb.disc_category) { @@ -2436,9 +2430,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Category: %s\n", this->cddb.disc_category); #endif - if(this->stream->meta_info[XINE_META_INFO_GENRE]) - free(this->stream->meta_info[XINE_META_INFO_GENRE]); - this->stream->meta_info[XINE_META_INFO_GENRE] = strdup(this->cddb.disc_category); + xine_set_meta_info(this->stream, XINE_META_INFO_GENRE, this->cddb.disc_category); } if(this->cddb.disc_year) { @@ -2446,9 +2438,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) { printf("Disc Year: %s\n", this->cddb.disc_year); #endif - if(this->stream->meta_info[XINE_META_INFO_YEAR]) - free(this->stream->meta_info[XINE_META_INFO_YEAR]); - this->stream->meta_info[XINE_META_INFO_YEAR] = strdup(this->cddb.disc_year); + xine_set_meta_info(this->stream, XINE_META_INFO_YEAR, this->cddb.disc_year); } free_cdrom_toc(toc); |