From 82755df8001eecdf4634be714058b36e6faac2aa Mon Sep 17 00:00:00 2001 From: Pacifico Paul <46673657+paulpacifico@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:29:40 +0400 Subject: [PATCH] Add files via upload --- src/application/VideoPlayer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/application/VideoPlayer.java b/src/application/VideoPlayer.java index a1c4e200..879b2b1e 100644 --- a/src/application/VideoPlayer.java +++ b/src/application/VideoPlayer.java @@ -902,7 +902,7 @@ public static boolean playerIsPlaying() { public static void playerSetTime(float time) { - if ((setTime == null || setTime.isAlive() == false) && playerThread != null && Shutter.doNotLoadImage == false && time < totalFrames - 2 && videoPath != null) + if ((setTime == null || setTime.isAlive() == false) && (frameVideo != null || playerCurrentFrame > 0) && playerThread != null && Shutter.doNotLoadImage == false && time < totalFrames - 2 && videoPath != null) { setTime = new Thread(new Runnable() { @@ -1048,7 +1048,7 @@ else if (framesToSkip != 0 || (framesToSkip == 0 && mouseIsPressed == false)) // playerProcess(t); long time = System.currentTimeMillis(); - + do { try { @@ -1056,7 +1056,9 @@ else if (framesToSkip != 0 || (framesToSkip == 0 && mouseIsPressed == false)) // } catch (InterruptedException e) {} if (frameVideo == null || System.currentTimeMillis() - time > 5000) + { frameIsComplete = true; + } } while (frameIsComplete == false);