From: Kostya Shishkov Date: Fri, 19 Nov 2021 17:27:59 +0000 (+0100) Subject: flush decoder post-seek X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=3ab5378796abde0cd9930804c07b36d52d8c3182;p=nihav-player.git flush decoder post-seek --- 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() } }