changeset 5492:b6f0445dbd07

Fix for RT-31622 - StopTimeUpdatePlayingTest fails
author "Alexander Matveev <Alexander.Matveev@oracle.com>"
date Tue, 22 Oct 2013 14:31:11 -0700
parents 670ff992ef78
children fece64961749
files modules/media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaPlayer.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaPlayer.java	Tue Oct 22 14:29:40 2013 -0700
+++ b/modules/media/src/main/java/com/sun/media/jfxmediaimpl/NativeMediaPlayer.java	Tue Oct 22 14:31:11 2013 -0700
@@ -1546,18 +1546,19 @@
     }
 
     boolean doMediaPulseTask() {
-        if (this.isMediaPulseEnabled.get()) {
-            markerLock.lock();
+        if (this.isMediaPulseEnabled.get()) {            
             disposeLock.lock();
 
             if (isDisposed) {
                 disposeLock.unlock();
-                markerLock.unlock();
                 return false;
             }
+            
+            double thisTime = getPresentationTime();
+            
+            markerLock.lock();
 
             try {
-                double thisTime = getPresentationTime();
                 //System.out.println("Media pulse @ pts "+thisTime+" previous "+previousTime);
 
                 if (checkSeek) {