[vlc-devel] [PATCH] bluray: use title names when available

Petri Hintukainen phintuka at gmail.com
Wed Nov 11 09:19:16 CET 2015


---
 modules/access/bluray.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 2558adb..d4200e7 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1436,6 +1436,12 @@ static void blurayInitTitles(demux_t *p_demux, int menu_titles)
             t->psz_name = strdup(_("Top Menu"));
         } else if (i == i_title - 1) {
             t->psz_name = strdup(_("First Play"));
+        } else {
+            /* add possible title name from disc metadata */
+            const BLURAY_DISC_INFO *di = bd_get_disc_info(p_sys->bluray);
+            if (di && di->titles && i < di->num_titles && di->titles[i]->name) {
+                t->psz_name = strdup(di->titles[i]->name);
+            }
         }
 
         TAB_APPEND(p_sys->i_title, p_sys->pp_title, t);
-- 
2.5.0



More information about the vlc-devel mailing list