From 6ff8b5886ef91ed46dba08686900d519f6c9c62d Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 19 Jun 2023 08:51:34 +1000 Subject: Support playing tracks by track id --- src/audio/audio_decoder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/audio/audio_decoder.cpp') 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& 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()) { -- cgit v1.2.3