[audio] Fix: Decoder stops unnecessarily after a potential failure is detected. (#8776)

This commit is contained in:
Mischa Siekmann 2025-05-13 14:35:19 +02:00 committed by GitHub
parent 6f8ee65919
commit 032949bc77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {