Add DESCRIPTION tag as an alias for COMMENT in flac files

This commit is contained in:
Ron Pedde 2007-10-23 03:43:17 +00:00
parent 34a4bb998e
commit ad5718bb9c

View File

@ -146,8 +146,16 @@ int scan_get_flacinfo(char *filename, MP3FILE *pmp3) {
strncpy(pmp3->composer, val, len);
} else if ((val = GET_VORBIS_COMMENT(block->data.vorbis_comment.comments[i],
"COMMENT", &len))) {
if(pmp3->comment)
free(pmp3->comment); /* was description */
if ((pmp3->comment = calloc(len + 1, 1)) != NULL)
strncpy(pmp3->comment, val, len);
} else if ((val = GET_VORBIS_COMMENT(block->data.vorbis_comment.comments[i],
"DESCRIPTION", &len))) {
if(!pmp3->comment) {
if ((pmp3->comment = calloc(len + 1, 1)) != NULL)
strncpy(pmp3->comment, val, len);
}
} else if ((val = GET_VORBIS_COMMENT(block->data.vorbis_comment.comments[i],
"TRACKNUMBER", &len))) {
tmp = *(val + len);