[vlc-devel] [PATCH 12/17] dvdread: handle matching_time
Thomas Guillem
thomas at gllm.fr
Tue Mar 9 15:15:41 UTC 2021
---
modules/access/dvdread.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index bd5cb84b3a1..a516bb0639b 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -631,7 +631,12 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *p, int len )
if( !ps_pkt_parse_pack( p_pkt->p_buffer, p_pkt->i_buffer,
&i_scr, &i_mux_rate ) )
{
- es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_scr );
+ vlc_tick_t i_matching_time = VLC_TICK_INVALID;
+
+ if( p_sys->cur_title >= 0 && p_sys->cur_title < p_sys->i_titles )
+ i_matching_time = dvdtime_to_time( &p_sys->p_cur_pgc->playback_time ) /
+ p_sys->i_title_blocks * p_sys->i_title_offset;
+ es_out_SetPCRTime( p_demux->out, VLC_TICK_0 + i_scr, i_matching_time );
if( i_mux_rate > 0 ) p_sys->i_mux_rate = i_mux_rate;
}
block_Release( p_pkt );
--
2.30.0
More information about the vlc-devel
mailing list