diff options
Diffstat (limited to 'src/audio/audio_decoder.cpp')
| -rw-r--r-- | src/audio/audio_decoder.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/audio/audio_decoder.cpp b/src/audio/audio_decoder.cpp index abb94e85..b4af65fb 100644 --- a/src/audio/audio_decoder.cpp +++ b/src/audio/audio_decoder.cpp @@ -89,9 +89,11 @@ auto AudioDecoder::Process(const std::vector<InputStream>& inputs, // Check the input stream's format has changed (or, by extension, if this is // the first stream). if (!current_input_format_ || *current_input_format_ != info.format) { - ESP_LOGI(kTag, "beginning new stream"); has_samples_to_send_ = false; - ProcessStreamInfo(info); + if (!ProcessStreamInfo(info)) { + return; + } + ESP_LOGI(kTag, "beginning new stream"); auto res = current_codec_->BeginStream(input->data()); input->consume(res.first); if (res.second.has_error()) { |
