[vlc-commits] dvdnav: Fix chapters time_offset

Hugo Beauzée-Luyssen git at videolan.org
Wed Jan 3 13:44:55 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jan  2 15:46:32 2018 +0100| [c0bad88568a2a17be786aeefa7f26126e2bb848a] | committer: Hugo Beauzée-Luyssen

dvdnav: Fix chapters time_offset

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

 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 );



More information about the vlc-commits mailing list