[vlc-devel] [RFC PATCH 2/4] ts: immplement DEMUX_GET_NPT
Thomas Guillem
thomas at gllm.fr
Tue Sep 10 18:33:05 CEST 2019
---
modules/demux/mpeg/ts.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 93009d487a..450390d8dd 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -1040,6 +1040,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
}
break;
+ case DEMUX_GET_NPT:
+ if ((p_sys->b_access_control && !EITCurrentEventTime( p_pmt, p_sys, NULL, NULL))
+ || (!p_pmt || p_pmt->pcr.i_current == -1 || p_pmt->pcr.i_first == -1))
+ return VLC_EGENERIC; /* use VLC_TICK_0 */
+ *va_arg( args, vlc_tick_t * ) = FROM_SCALE( p_pmt->pcr.i_first );
+ return VLC_SUCCESS;
case DEMUX_GET_LENGTH:
if( p_sys->b_access_control )
--
2.20.1
More information about the vlc-devel
mailing list