[libbluray-devel] add synchronized to clearOverlay()

hpi1 git at videolan.org
Mon Sep 1 14:07:29 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Aug 27 12:30:28 2014 +0300| [3fc5d689053d6e67485dd51f66b063ee48b208ad] | committer: hpi1

add synchronized to clearOverlay()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=3fc5d689053d6e67485dd51f66b063ee48b208ad
---

 src/libbluray/bdj/java/java/awt/BDRootWindow.java |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/libbluray/bdj/java/java/awt/BDRootWindow.java b/src/libbluray/bdj/java/java/awt/BDRootWindow.java
index 8caf35b..2d8c60b 100644
--- a/src/libbluray/bdj/java/java/awt/BDRootWindow.java
+++ b/src/libbluray/bdj/java/java/awt/BDRootWindow.java
@@ -140,11 +140,13 @@ public class BDRootWindow extends Frame {
 
     /* called when new title starts (window is "created" again) */
     public void clearOverlay() {
-        if (overlay_open) {
-            logger.error("clearOverlay() ignored (overlay is visible)");
-        } else {
-            Arrays.fill(backBuffer, 0);
-            dirty.clear();
+        synchronized (this) {
+            if (overlay_open) {
+                logger.error("clearOverlay() ignored (overlay is visible)");
+            } else {
+                Arrays.fill(backBuffer, 0);
+                dirty.clear();
+            }
         }
     }
 



More information about the libbluray-devel mailing list