[vlc-commits] bluray: always update chapters when playlist changes

Petri Hintukainen git at videolan.org
Tue Dec 1 13:39:46 CET 2015


vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Tue Dec  1 12:34:58 2015 +0200| [4560d10d9d18bd6a598ccebc69ae1ea6ff488a96] | committer: Jean-Baptiste Kempf

bluray: always update chapters when playlist changes

Fixes chapters in titles that play multiple playlists

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4560d10d9d18bd6a598ccebc69ae1ea6ff488a96
---

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

diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 183f2ae..8f62005 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1412,7 +1412,10 @@ static void blurayUpdateTitleInfo(input_title_t *t, BLURAY_TITLE_INFO *title_inf
 {
     t->i_length = FROM_TICKS(title_info->duration);
 
-    if (!t->i_seekpoint) {
+    for (int i = 0; i < t->i_seekpoint; i++)
+        vlc_seekpoint_Delete( t->seekpoint[i] );
+    TAB_CLEAN(t->i_seekpoint, t->seekpoint);
+
         for (unsigned int j = 0; j < title_info->chapter_count; j++) {
             seekpoint_t *s = vlc_seekpoint_New();
             if (!s) {
@@ -1422,7 +1425,6 @@ static void blurayUpdateTitleInfo(input_title_t *t, BLURAY_TITLE_INFO *title_inf
 
             TAB_APPEND(t->i_seekpoint, t->seekpoint, s);
         }
-    }
 }
 
 static void blurayInitTitles(demux_t *p_demux, int menu_titles)



More information about the vlc-commits mailing list