[libbluray-devel] [Git][videolan/libbluray][master] Fix dec_start() without menus

Petri Hintukainen (@hpi) gitlab at videolan.org
Sun Sep 26 17:28:18 UTC 2021



Petri Hintukainen pushed to branch master at VideoLAN / libbluray


Commits:
8412dc1e by npzacs at 2021-09-26T20:27:08+03:00
Fix dec_start() without menus

- - - - -


3 changed files:

- src/libbluray/bluray.c
- src/libbluray/disc/bdplus.c
- src/libbluray/disc/dec.c


Changes:

=====================================
src/libbluray/bluray.c
=====================================
@@ -2419,6 +2419,11 @@ static int _add_known_playlist(BD_DISC *p, const char *mpls_id)
 
 static int _open_playlist(BLURAY *bd, const char *f_name, unsigned angle)
 {
+    if (!bd->title_list && bd->title_type == title_undef) {
+        BD_DEBUG(DBG_BLURAY | DBG_CRIT, "open_playlist(%s): bd_play() or bd_get_titles() not called\n", f_name);
+        disc_event(bd->disc, DISC_EVENT_START, bd->disc_info.num_titles);
+    }
+
     _close_playlist(bd);
 
     bd->title = nav_title_open(bd->disc, f_name, angle);


=====================================
src/libbluray/disc/bdplus.c
=====================================
@@ -275,6 +275,10 @@ const uint8_t *libbdplus_get_data(BD_BDPLUS *p, int type)
             if (libbdplus_is_mmbd(p)) {
                 return (const uint8_t *)"mmbd";
             }
+            if ((int32_t)_bdplus_get(p, "bdplus_is_cached") > 0) {
+                return (const uint8_t *)"mmbd;libbdplus";
+            }
+            break;
     }
 
     return NULL;


=====================================
src/libbluray/disc/dec.c
=====================================
@@ -369,6 +369,7 @@ void dec_start(BD_DEC *dec, uint32_t num_titles)
         }
     } else {
         if (dec->bdplus) {
+            libbdplus_start(dec->bdplus);
             libbdplus_event(dec->bdplus, 0xffffffff, num_titles, 0);
         }
     }



View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/8412dc1ee24b186a161902de1dd9f15f712041f5

-- 
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/commit/8412dc1ee24b186a161902de1dd9f15f712041f5
You're receiving this email because of your account on code.videolan.org.




More information about the libbluray-devel mailing list