[vlc-commits] dvdnav: Fix chapters time_offset
Hugo Beauzée-Luyssen
git at videolan.org
Wed Jan 3 13:50:36 CET 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jan 2 15:46:32 2018 +0100| [dd3a018c5f934772f6ef5e72277c34ad09875292] | committer: Hugo Beauzée-Luyssen
dvdnav: Fix chapters time_offset
(cherry picked from commit c0bad88568a2a17be786aeefa7f26126e2bb848a)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=dd3a018c5f934772f6ef5e72277c34ad09875292
---
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 6a4cc4f215..95b877a9e0 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1209,7 +1209,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