]> git.nihav.org Git - nihav-player.git/commitdiff
videoplayer: do not end playback prematurely
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 10 Feb 2026 17:30:17 +0000 (18:30 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 10 Feb 2026 17:30:17 +0000 (18:30 +0100)
Previously it ended after all frames were decoded but
not necessarily displayed.

videoplayer/src/main.rs

index 71cdf4bd1983e3e512bfebfde8aae65fd45e68e5..8b1bbaa960a7415749c46fcb0c42efeb8fc781c9 100644 (file)
@@ -1088,7 +1088,7 @@ impl Player {
                     last_disp = Instant::now();
                 }
                 let mut end = true;
-                if self.has_video && !self.vcontrol.is_video_end() {
+                if self.has_video && !(self.vcontrol.is_video_end() && disp_q.is_empty()) {
                     end = false;
                 }
                 if self.has_audio && !self.acontrol.is_audio_end() {