diff options
author | waker <wakeroid@gmail.com> | 2012-05-17 23:12:00 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-05-17 23:12:00 +0200 |
commit | 6b97a160c2db19b808cbfc320a8a92da203d49ca (patch) | |
tree | 2c3d6594d65d0196c876719120da0d3908c9cbd2 /plugins/shn | |
parent | 816d87e1d38dc0fecbe1fa47794b2d7a18d2e321 (diff) |
fixed remaining pl_find_meta calls lacking pl_lock
Diffstat (limited to 'plugins/shn')
-rw-r--r-- | plugins/shn/shn.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c index da69866b..cc03ac72 100644 --- a/plugins/shn/shn.c +++ b/plugins/shn/shn.c @@ -322,7 +322,9 @@ shn_init(DB_fileinfo_t *_info, DB_playItem_t *it) { char data[4]; DB_FILE *f; + deadbeef->pl_lock (); f = deadbeef->fopen (deadbeef->pl_find_meta (it, ":URI")); + deadbeef->pl_unlock (); if (!f) { trace ("shn: failed to open %s\n", deadbeef->pl_find_meta (it, ":URI")); return -1; @@ -346,10 +348,13 @@ shn_init(DB_fileinfo_t *_info, DB_playItem_t *it) { return -1; } + deadbeef->pl_lock (); if (!(info->shnfile = load_shn(deadbeef->pl_find_meta (it, ":URI")))) { + deadbeef->pl_unlock (); trace ("shn: load_shn failed\n"); return -1; } + deadbeef->pl_unlock (); _info->fmt.bps = info->shnfile->wave_header.bits_per_sample; _info->fmt.channels = info->shnfile->wave_header.channels; |