summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2021-11-19 18:27:59 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2021-11-19 18:27:59 +0100
commit3ab5378796abde0cd9930804c07b36d52d8c3182 (patch)
tree4350a31e908ea6736871577c85a4da55b36010d9
parent0a70659f1bac51dda65d0c8349a219c565b56c8c (diff)
downloadnihav-player-3ab5378796abde0cd9930804c07b36d52d8c3182.tar.gz
flush decoder post-seek
-rw-r--r--sndplay/src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/sndplay/src/main.rs b/sndplay/src/main.rs
index 275826f..ce9b6f6 100644
--- a/sndplay/src/main.rs
+++ b/sndplay/src/main.rs
@@ -196,6 +196,7 @@ impl<'a> Decoder<'a> {
fn seek(&mut self, time: u64) -> bool {
let ret = self.demuxer.seek(NATimePoint::Milliseconds(time));
if ret.is_err() { println!(" seek error\n"); }
+ self.decoder.flush();
ret.is_ok()
}
}