[vlc-commits] bluray: Store the meta informations in p_sys

Hugo Beauzée-Luyssen git at videolan.org
Thu Mar 8 13:27:17 CET 2012


vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Mar  8 12:16:33 2012 +0100| [8ba3e95ced41eda38b4d1a1ddc6ac78e98a2833c] | committer: Jean-Baptiste Kempf

bluray: Store the meta informations in p_sys

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 425ee6e926369f3cb02033fbf60b5898ed19fff9)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=8ba3e95ced41eda38b4d1a1ddc6ac78e98a2833c
---

 modules/access/bluray.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index ede3960..8f1e2fb 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -98,6 +98,9 @@ struct  demux_sys_t
     unsigned int        i_longest_title;
     input_title_t       **pp_title;
 
+    /* Meta informations */
+    const META_DL       *p_meta;
+
     /* Menus */
     bluray_overlay_t    *p_overlays[MAX_OVERLAY];
     int                 current_overlay; // -1 if no current overlay;
@@ -242,6 +245,10 @@ static int blurayOpen( vlc_object_t *object )
     }
 
     /* Get titles and chapters */
+    p_sys->p_meta = bd_get_meta(p_sys->bluray);
+    if (!p_sys->p_meta)
+        goto error;
+
     if (blurayInitTitles(p_demux) != VLC_SUCCESS) {
         goto error;
     }
@@ -887,11 +894,8 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
 
         case DEMUX_GET_META:
         {
-            const struct meta_dl *meta = bd_get_meta(p_sys->bluray);
-            if(!meta)
-                return VLC_EGENERIC;
-
             vlc_meta_t *p_meta = (vlc_meta_t *) va_arg (args, vlc_meta_t*);
+            const META_DL *meta = p_sys->p_meta;
 
             if (!EMPTY_STR(meta->di_name)) vlc_meta_SetTitle(p_meta, meta->di_name);
 



More information about the vlc-commits mailing list