summaryrefslogtreecommitdiff
path: root/plugins/ffap
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-11 20:03:10 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-11 20:03:10 +0100
commit06698504cafb9d3b87674c51bbd49dbbb6a54db0 (patch)
tree24934f001c2951e2151411693bec178717686a0d /plugins/ffap
parent70fc72b7d985394517d3d84c3c160c3476adaf32 (diff)
playlist thread-safety measures
Diffstat (limited to 'plugins/ffap')
-rw-r--r--plugins/ffap/ffap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/ffap/ffap.c b/plugins/ffap/ffap.c
index 23daa170..d8acaff5 100644
--- a/plugins/ffap/ffap.c
+++ b/plugins/ffap/ffap.c
@@ -1726,14 +1726,17 @@ ffap_insert (DB_playItem_t *after, const char *fname) {
}
// embedded cue
+ deadbeef->pl_lock ();
const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet");
if (cuesheet) {
cue = deadbeef->pl_insert_cue_from_buffer (after, it, cuesheet, strlen (cuesheet), ape_ctx.totalsamples, ape_ctx.samplerate);
if (cue) {
deadbeef->pl_item_unref (it);
+ deadbeef->pl_unlock ();
return cue;
}
}
+ deadbeef->pl_unlock ();
deadbeef->pl_add_meta (it, "title", NULL);
after = deadbeef->pl_insert_item (after, it);