[vlc-commits] demux: ts: don't set growing end on when not probed
Francois Cartegnie
git at videolan.org
Thu Feb 22 16:38:35 CET 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 22 16:05:45 2018 +0100| [b1a183e273bb527cc8071b7f331cd54d308b642a] | committer: Francois Cartegnie
demux: ts: don't set growing end on when not probed
(cherry picked from commit 5fab09cf3fdfdd5650596aea6b254f7058e962e9)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b1a183e273bb527cc8071b7f331cd54d308b642a
---
modules/demux/mpeg/ts.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 58311c02af..729ef0015e 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2189,8 +2189,13 @@ static void ProgramSetPCR( demux_t *p_demux, ts_pmt_t *p_pmt, mtime_t i_pcr )
if( p_sys->b_access_control == false &&
vlc_stream_Tell( p_sys->stream ) > p_pmt->i_last_dts_byte )
{
- p_pmt->i_last_dts = i_pcr;
- p_pmt->i_last_dts_byte = vlc_stream_Tell( p_sys->stream );
+ if( p_pmt->i_last_dts_byte == 0 ) /* first run */
+ p_pmt->i_last_dts_byte = stream_Size( p_sys->stream );
+ else
+ {
+ p_pmt->i_last_dts = i_pcr;
+ p_pmt->i_last_dts_byte = vlc_stream_Tell( p_sys->stream );
+ }
}
}
}
More information about the vlc-commits
mailing list