decoder/API: copy exceptions to Decoder::error
This commit is contained in:
parent
746aa6cc0f
commit
b0b8f573bc
@ -342,7 +342,10 @@ try {
|
|||||||
|
|
||||||
return nbytes;
|
return nbytes;
|
||||||
} catch (const std::runtime_error &e) {
|
} catch (const std::runtime_error &e) {
|
||||||
LogError(e);
|
if (decoder != nullptr)
|
||||||
|
decoder->error = std::current_exception();
|
||||||
|
else
|
||||||
|
LogError(e);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,7 +493,7 @@ decoder_data(Decoder &decoder,
|
|||||||
/* the PCM conversion has failed - stop
|
/* the PCM conversion has failed - stop
|
||||||
playback, since we have no better way to
|
playback, since we have no better way to
|
||||||
bail out */
|
bail out */
|
||||||
LogError(e);
|
decoder.error = std::current_exception();
|
||||||
return DecoderCommand::STOP;
|
return DecoderCommand::STOP;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user