mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
[audio] Fix: Decoder stops unnecessarily after a potential failure is detected. (#8776)
This commit is contained in:
@@ -171,7 +171,7 @@ AudioDecoderState AudioDecoder::decode(bool stop_gracefully) {
|
|||||||
|
|
||||||
bytes_available_before_processing = this->input_transfer_buffer_->available();
|
bytes_available_before_processing = this->input_transfer_buffer_->available();
|
||||||
|
|
||||||
if ((this->potentially_failed_count_ > 10) && (bytes_read == 0)) {
|
if ((this->potentially_failed_count_ > 0) && (bytes_read == 0)) {
|
||||||
// Failed to decode in last attempt and there is no new data
|
// Failed to decode in last attempt and there is no new data
|
||||||
|
|
||||||
if ((this->input_transfer_buffer_->free() == 0) && first_loop_iteration) {
|
if ((this->input_transfer_buffer_->free() == 0) && first_loop_iteration) {
|
||||||
|
Reference in New Issue
Block a user