Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpacifico authored Sep 9, 2024
1 parent 83e32b9 commit 82755df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/application/VideoPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down Expand Up @@ -1048,15 +1048,17 @@ else if (framesToSkip != 0 || (framesToSkip == 0 && mouseIsPressed == false)) //
playerProcess(t);

long time = System.currentTimeMillis();

do {

try {
Thread.sleep(1);
} catch (InterruptedException e) {}

if (frameVideo == null || System.currentTimeMillis() - time > 5000)
{
frameIsComplete = true;
}

} while (frameIsComplete == false);

Expand Down

0 comments on commit 82755df

Please sign in to comment.