diff options
Diffstat (limited to 'src/DecoderAPI.cxx')
-rw-r--r-- | src/DecoderAPI.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DecoderAPI.cxx b/src/DecoderAPI.cxx index 7b850265b..1494e3f80 100644 --- a/src/DecoderAPI.cxx +++ b/src/DecoderAPI.cxx @@ -71,6 +71,12 @@ decoder_initialized(Decoder &decoder, &af_string)); decoder.convert = new PcmConvert(); + + Error error; + if (!decoder.convert->Open(dc.in_audio_format, + dc.out_audio_format, + error)) + decoder.error = std::move(error); } dc.Lock(); @@ -401,9 +407,7 @@ decoder_data(Decoder &decoder, assert(dc.in_audio_format != dc.out_audio_format); Error error; - data = decoder.convert->Convert(dc.in_audio_format, - data, length, - dc.out_audio_format, + data = decoder.convert->Convert(data, length, &length, error); if (data == nullptr) { |