decoder/Thread: catch C++ exceptions from the decoder plugin
This commit is contained in:
parent
308010794a
commit
a9acc9c971
@ -439,7 +439,7 @@ decoder_run_song(DecoderControl &dc,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
decoder_run(DecoderControl &dc)
|
decoder_run(DecoderControl &dc)
|
||||||
{
|
try {
|
||||||
dc.ClearError();
|
dc.ClearError();
|
||||||
|
|
||||||
assert(dc.song != nullptr);
|
assert(dc.song != nullptr);
|
||||||
@ -463,7 +463,10 @@ decoder_run(DecoderControl &dc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
decoder_run_song(dc, song, uri_utf8, path_fs);
|
decoder_run_song(dc, song, uri_utf8, path_fs);
|
||||||
|
} catch (...) {
|
||||||
|
dc.state = DecoderState::ERROR;
|
||||||
|
dc.error = std::current_exception();
|
||||||
|
dc.client_cond.signal();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user