[libbluray-devel] _get_title_info(): no need to reload current mpls file

hpi1 git at videolan.org
Thu May 11 16:40:06 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu May 11 12:16:10 2017 +0300| [55e31139d122d317c872e42ab10d91d2990c8bdf] | committer: hpi1

_get_title_info(): no need to reload current mpls file

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

 src/libbluray/bluray.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 835c6703..780b14bd 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2690,6 +2690,11 @@ static BLURAY_TITLE_INFO *_get_title_info(BLURAY *bd, uint32_t title_idx, uint32
     NAV_TITLE *title;
     BLURAY_TITLE_INFO *title_info;
 
+    /* current title ? => no need to load mpls file */
+    if (bd->title && bd->title->angle == angle && !strcmp(bd->title->name, mpls_name)) {
+        return _fill_title_info(bd->title, title_idx, playlist);
+    }
+
     title = nav_title_open(bd->disc, mpls_name, angle);
     if (title == NULL) {
         BD_DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open title %s!\n", mpls_name);



More information about the libbluray-devel mailing list