]> git.nihav.org Git - nihav-player.git/commitdiff
flush decoder post-seek
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 19 Nov 2021 17:27:59 +0000 (18:27 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 19 Nov 2021 17:27:59 +0000 (18:27 +0100)
sndplay/src/main.rs

index 275826ff9f7db9d425b5efc9a3c37a12179ba3ef..ce9b6f66d54271788ed7ee2ae21eb30becdba166 100644 (file)
@@ -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()
     }
 }