diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-11-22 18:32:54 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-11-22 18:32:54 +0100 |
commit | d7a1f8bafb5994e0bd0315bfe2206ef7006287f4 (patch) | |
tree | f1a8d1698ab3d6dc72b6bb879138f6ae1841267a /plugins/ffap | |
parent | 8a5d72dd1b7883acd1ede735ae6afb44ce94de5c (diff) |
added embedded cuesheet support to flac decoder
Diffstat (limited to 'plugins/ffap')
-rw-r--r-- | plugins/ffap/ffap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c index 993863ed..7269b32e 100644 --- a/plugins/ffap/ffap.c +++ b/plugins/ffap/ffap.c @@ -1668,6 +1668,19 @@ ffap_insert (DB_playItem_t *after, const char *fname) { deadbeef->fseek (fp, 0, SEEK_END); } int apeerr = deadbeef->junk_read_ape (it, fp); + + // embedded cue + const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet"); + if (cuesheet) { + DB_playItem_t *last = deadbeef->pl_insert_cue_from_buffer (after, fname, cuesheet, strlen (cuesheet), &plugin, plugin.filetypes[0], ape_ctx.totalsamples, ape_ctx.samplerate); + if (last) { + deadbeef->pl_item_free (it); + deadbeef->fclose (fp); + ape_free_ctx (&ape_ctx); + return last; + } + } + deadbeef->pl_add_meta (it, "title", NULL); after = deadbeef->pl_insert_item (after, it); |