[libbluray-devel] Log error when requested title not found

hpi1 git at videolan.org
Mon Apr 3 14:22:22 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr  3 11:42:36 2017 +0300| [a9a6c03ad690fdc005c5cb7953b1667254336784] | committer: hpi1

Log error when requested title not found

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

 src/libbluray/bdj/java/org/videolan/Libbluray.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index dead64b..48d6ab7 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -525,6 +525,10 @@ public class Libbluray {
         try {
             BDLocator locator = new BDLocator(null, titleNumber, -1);
             TitleImpl title   = (TitleImpl)SIManager.createInstance().getService(locator);
+            if (title == null) {
+                System.err.println("startTitle() failed: title " + titleNumber + " not found");
+                return false;
+            }
 
             titleContext = (TitleContext)ServiceContextFactory.getInstance().getServiceContext(null);
             titleContext.start(title, true);



More information about the libbluray-devel mailing list