[vlc-commits] input: use the original demux for slave synchronisation
Thomas Guillem
git at videolan.org
Fri Feb 23 16:35:12 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 23 14:47:47 2018 +0100| [2a8dda4c43b8967b5d53ee57a4de7f6aa99cff29] | committer: Thomas Guillem
input: use the original demux for slave synchronisation
When using a renderer, the filtered demux will report the time currently
displayed by the renderer. If slaves synchronize to this time, SPU or other ES
tracks will always come too late. To fix this issue, we fetch the time on the
original demux (that will report the time being buffered).
This could be removed in VLC 4.0 in favor of a new demux control, like
DEMUX_GET_BUFFERED_TIME.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a8dda4c43b8967b5d53ee57a4de7f6aa99cff29
---
src/input/input.c | 3 ++-
src/input/input_internal.h | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/input/input.c b/src/input/input.c
index a9e269dc4d..8c11d4e0ee 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2563,6 +2563,7 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
TAB_CLEAN( count, tab );
}
+ in->p_original_demux =
in->p_demux = InputDemuxNew( p_input, in, psz_access, psz_demux,
psz_path, psz_anchor );
@@ -2769,7 +2770,7 @@ static void SlaveDemux( input_thread_t *p_input )
int64_t i_time;
int i;
- if( demux_Control( input_priv(p_input)->master->p_demux, DEMUX_GET_TIME, &i_time ) )
+ if( demux_Control( input_priv(p_input)->master->p_original_demux, DEMUX_GET_TIME, &i_time ) )
{
msg_Err( p_input, "demux doesn't like DEMUX_GET_TIME" );
return;
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 16fd662fb3..532d3ed81f 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -50,6 +50,9 @@ typedef struct
demux_t *p_demux; /**< Demux object (most downstream) */
+ demux_t *p_original_demux; /**< Unfiltered demux. Can be used to fetch the
+ * original time for slave synchronisation. */
+
/* Title infos for that input */
bool b_title_demux; /* Titles/Seekpoints provided by demux */
int i_title;
More information about the vlc-commits
mailing list