summaryrefslogtreecommitdiff
path: root/plugins/ffap
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-22 18:32:54 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-22 18:32:54 +0100
commitd7a1f8bafb5994e0bd0315bfe2206ef7006287f4 (patch)
treef1a8d1698ab3d6dc72b6bb879138f6ae1841267a /plugins/ffap
parent8a5d72dd1b7883acd1ede735ae6afb44ce94de5c (diff)
added embedded cuesheet support to flac decoder
Diffstat (limited to 'plugins/ffap')
-rw-r--r--plugins/ffap/ffap.c13
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);