[libbluray-devel] Fix regressions from "Check BD-J capability on demand, cache results"

hpi1 git at videolan.org
Tue Jun 6 10:08:07 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Jun  6 10:26:33 2017 +0300| [b71fe5d9393a31e3d7e8f1d4523a6bf048da11cf] | committer: hpi1

Fix regressions from "Check BD-J capability on demand, cache results"

BD-J titles were marked unsupported.

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

 src/libbluray/bluray.c | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index e7cb9beb..ce4854d8 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -897,6 +897,21 @@ static int _run_gc(BLURAY *bd, gc_ctrl_e msg, uint32_t param)
  * disc info
  */
 
+static void _check_bdj(BLURAY *bd)
+{
+    if (!bd->disc_info.bdj_handled) {
+        if (!bd->disc || bd->disc_info.bdj_detected) {
+
+            /* Check if jvm + jar can be loaded ? */
+            switch (bdj_jvm_available(&bd->bdjstorage)) {
+            case 2: bd->disc_info.bdj_handled = 1;
+            case 1: bd->disc_info.libjvm_detected = 1;
+            default:;
+            }
+        }
+    }
+}
+
 static void _fill_disc_info(BLURAY *bd, BD_ENC_INFO *enc_info)
 {
     INDX_ROOT *index = NULL;
@@ -1011,6 +1026,8 @@ static void _fill_disc_info(BLURAY *bd, BD_ENC_INFO *enc_info)
 
         /* mark supported titles */
 
+        _check_bdj(bd);
+
         if (bd->disc_info.bdj_detected && !bd->disc_info.bdj_handled) {
             bd->disc_info.num_unsupported_titles = bd->disc_info.num_bdj_titles;
         }
@@ -1063,17 +1080,7 @@ static void _fill_disc_info(BLURAY *bd, BD_ENC_INFO *enc_info)
         }
     }
 
-    if (!bd->disc_info.bdj_handled) {
-        if (!bd->disc || bd->disc_info.bdj_detected) {
-
-            /* Check if jvm + jar can be loaded ? */
-            switch (bdj_jvm_available(&bd->bdjstorage)) {
-            case 2: bd->disc_info.bdj_handled = 1;
-            case 1: bd->disc_info.libjvm_detected = 1;
-            default:;
-            }
-        }
-    }
+    _check_bdj(bd);
 }
 
 const BLURAY_DISC_INFO *bd_get_disc_info(BLURAY *bd)



More information about the libbluray-devel mailing list