From f8b39df7616777fbac588b4e7b1578ae5dba8ee0 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 14 Mar 2022 17:54:38 +0100 Subject: [PATCH] ignore underruns when decoding has ended --- sndplay/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sndplay/src/main.rs b/sndplay/src/main.rs index ce9b6f6..c368651 100644 --- a/sndplay/src/main.rs +++ b/sndplay/src/main.rs @@ -363,7 +363,7 @@ impl Player { } } std::io::stdout().flush().unwrap(); - if device.size() < underfill_limit && !self.paused && refill_limit < (1 << 20) { + if device.size() < underfill_limit && !self.paused && (refill_limit < (1 << 20)) & !eof { if full_ms > 5000 { println!("underrun!"); } -- 2.30.2