[vlc-commits] demux: ts: use preparsing flag
Francois Cartegnie
git at videolan.org
Wed Oct 24 22:16:58 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 24 17:23:34 2018 +0200| [09ef812c050ee4ce6a2fcaffa9b9fd335a6757ac] | committer: Francois Cartegnie
demux: ts: use preparsing flag
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09ef812c050ee4ce6a2fcaffa9b9fd335a6757ac
---
modules/demux/mpeg/ts.c | 8 +++-----
modules/demux/mpeg/ts.h | 2 --
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 8efaa85209..62ab842e2d 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -519,17 +519,15 @@ static int Open( vlc_object_t *p_this )
vlc_stream_Control( p_sys->stream, STREAM_CAN_FASTSEEK,
&p_sys->b_canfastseek );
+ p_sys->es_creation = ( p_sys->b_access_control ? CREATE_ES : DELAY_ES );
+
/* Preparse time */
- if( p_sys->b_canseek )
+ if( p_demux->b_preparsing && p_sys->b_canseek )
{
- p_sys->es_creation = NO_ES;
while( !p_sys->i_pmt_es && !p_sys->b_end_preparse )
if( Demux( p_demux ) != VLC_DEMUXER_SUCCESS )
break;
- p_sys->es_creation = DELAY_ES;
}
- else
- p_sys->es_creation = ( p_sys->b_access_control ? CREATE_ES : DELAY_ES );
return VLC_SUCCESS;
}
diff --git a/modules/demux/mpeg/ts.h b/modules/demux/mpeg/ts.h
index 24ed821bd0..61dc399d4b 100644
--- a/modules/demux/mpeg/ts.h
+++ b/modules/demux/mpeg/ts.h
@@ -91,11 +91,9 @@ struct demux_sys_t
enum
{
- NO_ES, /* for preparse */
DELAY_ES,
CREATE_ES
} es_creation;
- #define PREPARSING p_sys->es_creation == NO_ES
/* */
bool b_es_id_pid;
More information about the vlc-commits
mailing list