[libbluray-devel] bdj: reset SIManager between discs

hpi1 git at videolan.org
Wed Mar 5 09:37:30 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Mar  5 10:14:29 2014 +0200| [05df2f7b2157529c294bc47efd89d92d648e879a] | committer: hpi1

bdj: reset SIManager between discs

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

 src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java |    6 ++++++
 src/libbluray/bdj/java/org/videolan/Libbluray.java         |    2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java b/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java
index 63f619b..cef609c 100644
--- a/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java
+++ b/src/libbluray/bdj/java/javax/tv/service/SIManagerImpl.java
@@ -41,6 +41,12 @@ public class SIManagerImpl extends SIManager {
         }
     }
 
+    public static void shutdown() {
+        synchronized (SIManagerImpl.class) {
+            instance = null;
+        }
+    }
+
     protected SIManagerImpl() {
         int ntitles = Libbluray.getTitles();
         LinkedList list = new LinkedList();
diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index 0587121..c769e11 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -24,6 +24,7 @@ import java.awt.event.KeyEvent;
 import java.util.Vector;
 
 import javax.media.PackageManager;
+import javax.tv.service.SIManagerImpl;
 import javax.tv.service.selection.ServiceContextFactory;
 
 import org.bluray.ti.DiscManager;
@@ -130,6 +131,7 @@ public class Libbluray {
             MountManager.unmountAll();
             GUIManager.shutdown();
             BDToolkit.shutdownDisc();
+            SIManagerImpl.shutdown();
         } catch (Throwable e) {
             e.printStackTrace();
         }



More information about the libbluray-devel mailing list