decoder/Control: convert error from Error to std::exception_ptr
Prepare full C++ exception support in the decoder thread.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "tag/Tag.hxx"
|
||||
#include "Idle.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
#include "util/Error.hxx"
|
||||
#include "thread/Name.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
@@ -372,9 +373,10 @@ Player::StopDecoder()
|
||||
bool
|
||||
Player::ForwardDecoderError()
|
||||
{
|
||||
Error error = dc.GetError();
|
||||
if (error.IsDefined()) {
|
||||
pc.SetError(PlayerError::DECODER, std::move(error));
|
||||
try {
|
||||
dc.CheckRethrowError();
|
||||
} catch (...) {
|
||||
pc.SetError(PlayerError::DECODER, std::current_exception());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user