diff options
author | waker <wakeroid@gmail.com> | 2011-03-28 20:24:22 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-03-28 20:24:22 +0200 |
commit | bd53ff68a03689b9de8e5203bcf313d4b80591e4 (patch) | |
tree | 14ee7dda01885c9e03a1681f0a0596231169b255 /playlist.c | |
parent | de862934571eb38848c8958d8e3c60c4856f3976 (diff) |
fix race condition in pl_format_item_queue
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2639,6 +2639,7 @@ pl_get_item_replaygain (playItem_t *it, int idx) { int pl_format_item_queue (playItem_t *it, char *s, int size) { + LOCK; *s = 0; int initsize = size; const char *val = pl_find_meta (it, "_playing"); @@ -2686,9 +2687,9 @@ pl_format_item_queue (playItem_t *it, char *s, int size) { } if (!playqueue_count) { + UNLOCK; return 0; } - LOCK; int qinitsize = size; int init = 1; |