[libbluray-devel] (quick) fix deadlock when playlist player is started before stopping previous one.

hpi1 git at videolan.org
Fri Jan 24 20:30:03 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Jan 24 12:51:00 2014 +0200| [148015edc1d46b73f3b6b9e9e6bfcf2e6af23eac] | committer: hpi1

(quick)fix deadlock when playlist player is started before stopping previous one.

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

 src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java  |    2 +-
 .../bdj/java/org/videolan/media/content/PlayerManager.java        |    5 +++--
 2 files changed, 4 insertions(+), 3 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 bbdadfc..6f135fe 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
@@ -432,7 +432,7 @@ public abstract class BDHandler implements Player, ServiceContentHandler {
         return true;
     }
 
-    private boolean doDeallocateAction() {
+    protected boolean doDeallocateAction() {
         ControllerErrorEvent error;
         switch (state) {
         case Realizing:
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java b/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java
index 1b5d278..3ce854b 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java
@@ -77,8 +77,9 @@ public class PlayerManager {
         if (player instanceof org.videolan.media.content.playlist.Handler) {
             synchronized (playlistPlayerLock) {
                 if (playlistPlayer != null && player != playlistPlayer) {
-                    playlistPlayer.stop();
-                    playlistPlayer.deallocate();
+                    //playlistPlayer.stop();
+                    //playlistPlayer.deallocate();
+                    playlistPlayer.doDeallocateAction();
                 }
                 playlistPlayer = player;
             }



More information about the libbluray-devel mailing list