Skip to content
Snippets Groups Projects
Commit 70da6668 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

demux:mkv: fix the position displayed for ordered chapters

parent 566df1a6
Branches 3.1.x
Tags 3.1.7
No related merge requests found
...@@ -335,7 +335,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -335,7 +335,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_POSITION: case DEMUX_GET_POSITION:
pf = va_arg( args, double * ); pf = va_arg( args, double * );
if ( p_sys->f_duration > 0.0 ) 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; return VLC_SUCCESS;
case DEMUX_SET_POSITION: case DEMUX_SET_POSITION:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment