summaryrefslogtreecommitdiff
path: root/cmp3.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-08-07 22:37:32 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-08-07 22:37:32 +0200
commit4fa0d0375913a45ae93103ce6f006f8fa134357b (patch)
treeae8621292e93fefe963c433d191384daa1a36668 /cmp3.c
parent403128abb088f8db7d64ef00b965198192194e4a (diff)
added flac vorbiscomment metadata support
Diffstat (limited to 'cmp3.c')
-rw-r--r--cmp3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmp3.c b/cmp3.c
index 13e7bf97..17b41edf 100644
--- a/cmp3.c
+++ b/cmp3.c
@@ -753,6 +753,7 @@ cmp3_read_id3v1 (playItem_t *it, FILE *fp) {
int
cmp3_read_id3v2 (playItem_t *it, FILE *fp) {
+ int title_added = 0;
if (!it || !fp) {
printf ("bad call to cmp3_read_id3v2!\n");
return -1;
@@ -872,6 +873,7 @@ cmp3_read_id3v2 (playItem_t *it, FILE *fp) {
memcpy (str, readptr, sz);
str[sz] = 0;
ps_add_meta (it, "title", convstr (str, sz));
+ title_added = 1;
}
readptr += sz;
}
@@ -910,10 +912,14 @@ cmp3_read_id3v2 (playItem_t *it, FILE *fp) {
memcpy (str, readptr, sz);
str[sz] = 0;
ps_add_meta (it, "title", convstr (str, sz));
+ title_added = 1;
}
readptr += sz;
}
}
+ if (!title_added) {
+ ps_add_meta (it, "title", NULL);
+ }
return 0;
}