diff options
Diffstat (limited to 'apps/metadata/vorbis.c')
-rw-r--r-- | apps/metadata/vorbis.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/apps/metadata/vorbis.c b/apps/metadata/vorbis.c index f6d3af1cef..29848daa19 100644 --- a/apps/metadata/vorbis.c +++ b/apps/metadata/vorbis.c | |||
@@ -341,15 +341,29 @@ long read_vorbis_tags(int fd, struct mp3entry *id3, | |||
341 | } | 341 | } |
342 | 342 | ||
343 | len -= read_len; | 343 | len -= read_len; |
344 | read_len = file_read_string(&file, id3->path, sizeof(id3->path), -1, len); | ||
344 | 345 | ||
345 | if (file_read_string(&file, id3->path, sizeof(id3->path), -1, len) < 0) | 346 | if (read_len < 0) |
346 | { | 347 | { |
347 | return 0; | 348 | return 0; |
348 | } | 349 | } |
349 | 350 | ||
350 | logf("Vorbis comment %d: %s=%s", i, name, id3->path); | 351 | logf("Vorbis comment %d: %s=%s", i, name, id3->path); |
351 | len = parse_tag(name, id3->path, id3, buf, buf_remaining, | 352 | |
352 | TAGTYPE_VORBIS); | 353 | /* Is it an embedded cuesheet? */ |
354 | if (!strcasecmp(name, "CUESHEET")) | ||
355 | { | ||
356 | id3->embed_cuesheet.present = true; | ||
357 | id3->embed_cuesheet.pos = lseek(file.fd, 0, SEEK_CUR) - read_len; | ||
358 | id3->embed_cuesheet.size = len; | ||
359 | id3->embed_cuesheet.encoding = CHAR_ENC_UTF_8; | ||
360 | } | ||
361 | else | ||
362 | { | ||
363 | len = parse_tag(name, id3->path, id3, buf, buf_remaining, | ||
364 | TAGTYPE_VORBIS); | ||
365 | } | ||
366 | |||
353 | buf += len; | 367 | buf += len; |
354 | buf_remaining -= len; | 368 | buf_remaining -= len; |
355 | } | 369 | } |