[vlc-devel] [PATCH] dvdnav: Fix chapters time_offset
    Hugo Beauzée-Luyssen 
    hugo at beauzee.fr
       
    Tue Jan  2 15:47:11 CET 2018
    
    
  
---
 modules/access/dvdnav.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 955cd98d24..b7a8d9d97c 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1218,7 +1218,12 @@ static void DemuxTitles( demux_t *p_demux )
         {
             s = vlc_seekpoint_New();
             if( p_chapters_time )
-                s->i_time_offset = p_chapters_time[j] * 1000 / 90;
+            {
+                if ( j > 0 )
+                    s->i_time_offset = p_chapters_time[j - 1] * 1000 / 90;
+                else
+                    s->i_time_offset = 0;
+            }
             TAB_APPEND( t->i_seekpoint, t->seekpoint, s );
         }
         free( p_chapters_time );
-- 
2.11.0
    
    
More information about the vlc-devel
mailing list