summaryrefslogtreecommitdiff
path: root/plugins/sndfile/sndfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sndfile/sndfile.c')
-rw-r--r--plugins/sndfile/sndfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/sndfile/sndfile.c b/plugins/sndfile/sndfile.c
index dfb956de..2be2759b 100644
--- a/plugins/sndfile/sndfile.c
+++ b/plugins/sndfile/sndfile.c
@@ -204,11 +204,6 @@ sndfile_insert (DB_playItem_t *after, const char *fname) {
deadbeef->fclose (sfctx.file);
float duration = (float)totalsamples / samplerate;
- DB_playItem_t *cue_after = deadbeef->pl_insert_cue (after, fname, &plugin, "sndfile", totalsamples, samplerate);
- if (cue_after) {
- return cue_after;
- }
-
DB_playItem_t *it = deadbeef->pl_item_alloc ();
it->decoder = &plugin;
it->fname = strdup (fname);
@@ -217,6 +212,11 @@ sndfile_insert (DB_playItem_t *after, const char *fname) {
trace ("sndfile: totalsamples=%d, samplerate=%d, duration=%f\n", totalsamples, samplerate, duration);
+ DB_playItem_t *cue_after = deadbeef->pl_insert_cue (after, it, totalsamples, samplerate);
+ if (cue_after) {
+ return cue_after;
+ }
+
deadbeef->pl_add_meta (it, "title", NULL);
after = deadbeef->pl_insert_item (after, it);