vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Fri Feb 23 09:51:51 
2018 +0100| [70da66682371e9f195cd65cb8c722bac310ec73c] | committer: Steve Lhomme

demux:mkv: fix the position displayed for ordered chapters

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

 modules/demux/mkv/mkv.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 2a9ada5eff..9549abe9ff 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -335,7 +335,9 @@ static int Control( demux_t *p_demux, int i_query, va_list 
args )
         case DEMUX_GET_POSITION:
             pf = va_arg( args, double * );
             if ( p_sys->f_duration > 0.0 )
-                *pf = static_cast<double> (p_sys->i_pcr >= p_sys->i_start_pts 
? p_sys->i_pcr : p_sys->i_start_pts ) / (1000.0 * p_sys->f_duration);
+                *pf = static_cast<double> (p_sys->i_pcr >= (p_sys->i_start_pts 
+ p_sys->i_mk_chapter_time) ?
+                                               p_sys->i_pcr :
+                                               (p_sys->i_start_pts + 
p_sys->i_mk_chapter_time) ) / (1000.0 * p_sys->f_duration);
             return VLC_SUCCESS;
 
         case DEMUX_SET_POSITION:

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to