diff options
Diffstat (limited to 'src/decoder/plugins/MpcdecDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/MpcdecDecoderPlugin.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/decoder/plugins/MpcdecDecoderPlugin.cxx b/src/decoder/plugins/MpcdecDecoderPlugin.cxx index 7b650fede..ee14fcea2 100644 --- a/src/decoder/plugins/MpcdecDecoderPlugin.cxx +++ b/src/decoder/plugins/MpcdecDecoderPlugin.cxx @@ -32,6 +32,8 @@ #include <mpc/mpcdec.h> +#include <stdexcept> + #include <math.h> struct mpc_decoder_data { @@ -62,7 +64,12 @@ mpc_seek_cb(mpc_reader *reader, mpc_int32_t offset) struct mpc_decoder_data *data = (struct mpc_decoder_data *)reader->data; - return data->is.LockSeek(offset, IgnoreError()); + try { + data->is.LockSeek(offset); + return true; + } catch (const std::runtime_error &) { + return false; + } } static mpc_int32_t |