[vlc-commits] Simplify/fix checks enabling the use of pcr for seeking/ positioning in the TS demuxer.
Laurent Aimar
git at videolan.org
Sat Oct 8 20:12:35 CEST 2011
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Oct 8 20:08:29 2011 +0200| [314f2f9409b347f3c3fae70ec851ae394f085aec] | committer: Laurent Aimar
Simplify/fix checks enabling the use of pcr for seeking/positioning in the TS demuxer.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=314f2f9409b347f3c3fae70ec851ae394f085aec
---
modules/demux/ts.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 684529d..5d43d02 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -1200,7 +1200,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if( p_sys->b_force_seek_per_percent ||
(p_sys->b_dvb_meta && p_sys->b_access_control) ||
- p_sys->i_first_pcr < 0 ||
p_sys->i_current_pcr - p_sys->i_first_pcr < 0 ||
p_sys->i_last_pcr - p_sys->i_first_pcr <= 0 )
{
@@ -1223,7 +1222,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if( p_sys->b_force_seek_per_percent ||
(p_sys->b_dvb_meta && p_sys->b_access_control) ||
- p_sys->i_first_pcr < 0 ||
p_sys->i_last_pcr - p_sys->i_first_pcr <= 0 )
{
i64 = stream_Size( p_demux->s );
@@ -1243,7 +1241,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
if( (p_sys->b_dvb_meta && p_sys->b_access_control) ||
- p_sys->i_first_pcr < 0 ||
+ p_sys->b_force_seek_per_percent ||
p_sys->i_current_pcr - p_sys->i_first_pcr < 0 )
{
if( DVBEventInformation( p_demux, pi64, NULL ) )
@@ -1260,7 +1258,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_LENGTH:
pi64 = (int64_t*)va_arg( args, int64_t * );
if( (p_sys->b_dvb_meta && p_sys->b_access_control) ||
- p_sys->i_first_pcr < 0 ||
+ p_sys->b_force_seek_per_percent ||
p_sys->i_last_pcr - p_sys->i_first_pcr <= 0 )
{
if( DVBEventInformation( p_demux, NULL, pi64 ) )
More information about the vlc-commits
mailing list