[vlc-commits] demux:mp4: read the GPAC chapters as msftime_t since they are in 100ns

Steve Lhomme git at videolan.org
Fri Jul 6 09:20:21 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun  8 13:48:00 2018 +0200| [c8f6bb3eda16130564378509a592d45c5c4d7159] | committer: Steve Lhomme

demux:mp4: read the GPAC chapters as msftime_t since they are in 100ns

And convert to vlc_tick_t using VLC_TICK_FROM_MSFTIME

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

 modules/demux/mp4/mp4.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index dea92d54b4..1aa605d727 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2267,7 +2267,8 @@ static void LoadChapterGpac( demux_t  *p_demux, MP4_Box_t *p_chpl )
         }
 
         EnsureUTF8( s->psz_name );
-        s->i_time_offset = BOXDATA(p_chpl)->chapter[i].i_start / 10;
+        msftime_t offset = BOXDATA(p_chpl)->chapter[i].i_start;
+        s->i_time_offset = VLC_TICK_FROM_MSFTIME(offset);
         TAB_APPEND( p_sys->p_title->i_seekpoint, p_sys->p_title->seekpoint, s );
     }
 }



More information about the vlc-commits mailing list