[libbluray-devel] Player: simplify creation when created in privileged context

hpi1 git at videolan.org
Tue Nov 24 09:45:02 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Nov 24 10:23:37 2015 +0200| [b09423fce292f35f57963079a921595ae482029e] | committer: hpi1

Player: simplify creation when created in privileged context

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

 .../bdj/java/org/videolan/media/content/BDHandler.java      |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java b/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
index 3d43579..92269f1 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
@@ -67,10 +67,13 @@ public abstract class BDHandler implements Player, ServiceContentHandler {
 
     public BDHandler() {
         ownerContext = BDJXletContext.getCurrentContext();
-
-        PlayerAction action = new PlayerAction(this, PlayerAction.ACTION_INIT, null);
-        BDJActionManager.getInstance().putCommand(action);
-        action.waitEnd();
+        if (ownerContext == null) {
+            doInitAction();
+        } else {
+            PlayerAction action = new PlayerAction(this, PlayerAction.ACTION_INIT, null);
+            BDJActionManager.getInstance().putCommand(action);
+            action.waitEnd();
+        }
     }
 
     private void doInitAction() {



More information about the libbluray-devel mailing list