[vlc-commits] ts: cache the low-delay option
Thomas Guillem
git at videolan.org
Mon Dec 9 12:11:52 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Nov 27 13:53:43 2019 +0100| [fc98ba74bbba51c23b8cb4685b4773347ea3da4e] | committer: Thomas Guillem
ts: cache the low-delay option
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc98ba74bbba51c23b8cb4685b4773347ea3da4e
---
modules/demux/mpeg/ts.c | 6 ++++--
modules/demux/mpeg/ts.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index d66412b197..dd7a87acc7 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -502,6 +502,7 @@ static int Open( vlc_object_t *p_this )
p_sys->b_canseek = false;
p_sys->b_canfastseek = false;
+ p_sys->b_lowdelay = var_InheritBool( p_demux, "low-delay" );
p_sys->b_ignore_time_for_positions = var_InheritBool( p_demux, "ts-seek-percent" );
p_sys->b_cc_check = var_InheritBool( p_demux, "ts-cc-check" );
@@ -1460,7 +1461,8 @@ static block_t * ConvertPESBlock( demux_t *p_demux, ts_es_t *p_es,
****************************************************************************/
static void SendDataChain( demux_t *p_demux, ts_es_t *p_es, block_t *p_chain )
{
- bool b_lowdelay = var_InheritBool(p_demux, "low-delay");
+ demux_sys_t *p_sys = p_demux->p_sys;
+
while( p_chain )
{
block_t *p_block = p_chain;
@@ -1470,7 +1472,7 @@ static void SendDataChain( demux_t *p_demux, ts_es_t *p_es, block_t *p_chain )
/* clean up any private flag */
p_block->i_flags &= ~BLOCK_FLAG_PRIVATE_MASK;
- if( b_lowdelay )
+ if( p_sys->b_lowdelay )
p_block->i_flags |= BLOCK_FLAG_AU_END;
ts_es_t *p_es_send = p_es;
diff --git a/modules/demux/mpeg/ts.h b/modules/demux/mpeg/ts.h
index 2ba3f207e9..613a03ebcc 100644
--- a/modules/demux/mpeg/ts.h
+++ b/modules/demux/mpeg/ts.h
@@ -56,6 +56,7 @@ struct demux_sys_t
stream_t *stream;
bool b_canseek;
bool b_canfastseek;
+ bool b_lowdelay;
int current_title;
int current_seekpoint;
unsigned updates;
More information about the vlc-commits
mailing list