[libbluray-devel] playlist player: use current service locator when validating EndOfMedia event

hpi1 git at videolan.org
Sun Apr 17 21:42:00 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Apr 17 22:08:35 2016 +0300| [70c3566589baa9272496f9a93c942544eb5c6f58] | committer: hpi1

playlist player: use current service locator when validating EndOfMedia event

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

 .../java/org/videolan/media/content/playlist/Handler.java    |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
index ae81c61..9d2aadb 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/playlist/Handler.java
@@ -306,12 +306,12 @@ public class Handler extends BDHandler {
 
     protected void doEndOfMediaReached(int playlist) {
         synchronized (this) {
-            if (locator == null) {
-                System.err.println("endOfMedia(" + playlist + ") ignored: no current locator");
+            if (currentLocator == null) {
+                logger.error("endOfMedia(" + playlist + ") ignored: no current locator");
                 return;
             }
-            if (locator.getPlayListId() != playlist) {
-                System.err.println("endOfMedia ignored: playlist does not match (" + playlist + " != " + locator.getPlayListId());
+            if (currentLocator.getPlayListId() != playlist) {
+                logger.error("endOfMedia ignored: playlist does not match (" + playlist + " != " + currentLocator.getPlayListId());
                 return;
             }
         }
@@ -425,4 +425,6 @@ public class Handler extends BDHandler {
     private PlaylistInfo pi = null;
     private BDLocator currentLocator = null;
     private BDLocator locator = null;
+
+    private static final Logger logger = Logger.getLogger(Handler.class.getName());
 }



More information about the libbluray-devel mailing list