From ac7de4a7b2cc939312cbeb88dd709a297c96c13c Mon Sep 17 00:00:00 2001 From: Xerxes RĂ„nby Date: Tue, 25 Feb 2014 14:36:22 +0100 Subject: Bug 927: Try fix deadlock. (14:15:13) sgothel: @Xerxes: In doResume .. do a 'while( !isActive && !shallPause && isRunning ) {' (14:15:52) sgothel: doPause: while( isActive && !shallPause && isRunning ) (14:31:55) sgothel: doPause only: while( isActive && isRunning ) { --- src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util') diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index 7cea51dc8..6a0e0061f 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -1127,7 +1127,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { if( isBlocked && isActive ) { this.interrupt(); } - while( isActive ) { + while( isActive && isRunning ) { try { this.wait(); // wait until paused } catch (InterruptedException e) { @@ -1141,7 +1141,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { if( isRunning && !isActive ) { shallPause = false; if( Thread.currentThread() != this ) { - while( !isActive ) { + while( !isActive && !shallPause && isRunning ) { this.notifyAll(); // wake-up pause-block try { this.wait(); // wait until resumed -- cgit v1.2.3