]> git.sesse.net Git - vlc/blobdiff - modules/access/bluray.c
Fix Metacube header handling with multiple header blocks.
[vlc] / modules / access / bluray.c
index 7ca6f2fd219c28d56780ae8ab9e27186138809e7..238cf6b661d9c69629f4c320175111dfcbe63e37 100644 (file)
@@ -26,7 +26,6 @@
 #endif
 
 #include <assert.h>
-#include <limits.h>                         /* PATH_MAX */
 
 #if defined (HAVE_MNTENT_H) && defined(HAVE_SYS_STAT_H)
 # include <mntent.h>
@@ -773,7 +772,7 @@ static int onMouseEvent(vlc_object_t *p_vout, const char *psz_var, vlc_value_t o
         bd_mouse_select(p_sys->bluray, now, val.coords.x, val.coords.y);
         bd_user_input(p_sys->bluray, now, BD_VK_MOUSE_ACTIVATE);
     } else {
-        assert(0);
+        vlc_assert_unreachable();
     }
     return VLC_SUCCESS;
 }
@@ -880,7 +879,7 @@ static void blurayInitOverlay(demux_t *p_demux, int plane, int width, int height
         return;
     }
     /* two references: vout + demux */
-    ov->released_once = ATOMIC_FLAG_INIT;
+    atomic_flag_clear(&ov->released_once);
 
     p_upd_sys->p_overlay = ov;
     subpicture_updater_t updater = {
@@ -1164,18 +1163,13 @@ static void blurayUpdateTitleInfo(input_title_t *t, BLURAY_TITLE_INFO *title_inf
 static void blurayInitTitles(demux_t *p_demux, int menu_titles)
 {
     demux_sys_t *p_sys = p_demux->p_sys;
-#if BLURAY_VERSION < BLURAY_VERSION_CODE(0,5,0)
-    int64_t duration = 0;
-#endif
 
     /* get and set the titles */
     unsigned i_title = menu_titles;
 
     if (!p_sys->b_menu) {
         i_title = bd_get_titles(p_sys->bluray, TITLES_RELEVANT, 60);
-#if BLURAY_VERSION >= BLURAY_VERSION_CODE(0,5,0)
         p_sys->i_longest_title = bd_get_main_title(p_sys->bluray);
-#endif
     }
 
     for (unsigned int i = 0; i < i_title; i++) {
@@ -1188,12 +1182,6 @@ static void blurayInitTitles(demux_t *p_demux, int menu_titles)
             blurayUpdateTitleInfo(t, title_info);
             bd_free_title_info(title_info);
 
-#if BLURAY_VERSION < BLURAY_VERSION_CODE(0,5,0)
-            if (t->i_length > duration) {
-                duration = t->i_length;
-                p_sys->i_longest_title = i;
-            }
-#endif
         } else if (i == 0) {
             t->psz_name = strdup(_("Top Menu"));
         } else if (i == i_title - 1) {