diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-11-25 21:22:23 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-11-25 21:22:23 +0000 |
commit | b16de9c5e59ce99cba75f51cde8f2c441d36e55b (patch) | |
tree | d9ba24b391a016967e370c95cce8883b85d06e19 /src/demuxers | |
parent | abdd7c762e646a27d0db6951364148163a0d7925 (diff) | |
parent | 0e2e43f9050cde0fd5c34d4848cda31bb4ef6a2e (diff) | |
download | xine-lib-b16de9c5e59ce99cba75f51cde8f2c441d36e55b.tar.gz xine-lib-b16de9c5e59ce99cba75f51cde8f2c441d36e55b.tar.bz2 |
Merge from 1.1.
Some fixups were required for the kfreebsd patch; needs testing.
--HG--
rename : src/video_out/libdha/ports.c => contrib/libdha/ports.c
rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
rename : src/libxineadec/xine_vorbis_decoder.c => src/combined/xine_vorbis_decoder.c
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/id3.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/demuxers/id3.c b/src/demuxers/id3.c index 8eb413f83..5c13a306e 100644 --- a/src/demuxers/id3.c +++ b/src/demuxers/id3.c @@ -45,7 +45,7 @@ #include "bswap.h" #include "id3.h" -#define ID3_GENRE_COUNT 126 +#define ID3_GENRE_COUNT (sizeof (id3_genre) / sizeof (id3_genre[0])) static const char* const id3_genre[] = {"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", @@ -72,7 +72,11 @@ static const char* const id3_genre[] = "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", - "Dance Hall" }; + "Dance Hall", "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", + "Indie", "BritPop", "Negerpunk", "Polsk Punk", "Beat", + "Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover", + "Contemporary Christian", "Christian Rock", "Merengue", "Salsa", + "Thrash Metal", "Anime", "JPop", "Synthpop" }; #define ID3_ENCODING_COUNT 4 static const char* const id3_encoding[] = { @@ -595,15 +599,15 @@ int id3v23_parse_tag(input_plugin_t *input, /* id3v2 "genre" parsing code. what a ugly format ! */ static int id3v24_parse_genre(char* dest, char *src, int len) { - int index = 0; + unsigned int index = 0; dest[0] = '\0'; - if (sscanf(src, "%2d", &index) == 1) { + if (sscanf(src, "%u", &index) == 1) { if (index < ID3_GENRE_COUNT) { strncpy(dest, id3_genre[index], len); dest[len - 1] = '\0'; } else { - lprintf("invalid index: %d\n", index); + lprintf("invalid index: %u\n", index); } } return 1; |