FileCommands: fix deadlock in "albumart" command
Must lock the mutex before calling any of the unprotected InputStream methods. Closes #462
This commit is contained in:
parent
02c68c5cdb
commit
05db6934eb
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
|||
ver 0.21.5 (not yet released)
|
||||
* protocol
|
||||
- fix deadlock in "albumart" command
|
||||
* tags
|
||||
- ape: map "Album Artist"
|
||||
* output
|
||||
|
|
|
@ -285,8 +285,11 @@ read_stream_art(Response &r, const char *uri, size_t offset)
|
|||
uint8_t buffer[CHUNK_SIZE];
|
||||
size_t read_size;
|
||||
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
is->Seek(offset);
|
||||
read_size = is->Read(&buffer, CHUNK_SIZE);
|
||||
}
|
||||
|
||||
r.Format("size: %" PRIoffset "\n"
|
||||
"binary: %u\n",
|
||||
|
|
Loading…
Reference in New Issue