[vlc-commits] demux: ts: really don't assume dts/pts are present
Francois Cartegnie
git at videolan.org
Sun Feb 28 21:26:58 CET 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Feb 28 21:24:57 2016 +0100| [d7df2e9adc4050173b98688b3b2b7286da724592] | committer: Francois Cartegnie
demux: ts: really don't assume dts/pts are present
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d7df2e9adc4050173b98688b3b2b7286da724592
---
modules/demux/mpeg/ts.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 2cde7ba..4b8e3e7 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2123,20 +2123,20 @@ static void PCRCheckDTS( demux_t *p_demux, ts_pmt_t *p_pmt, mtime_t i_pcr)
continue;
if (p_pmt->pcr.i_pcroffset > 0) {
- if( i_dts > 0 ) {
+ if( i_dts > VLC_TS_INVALID )
i_dts += p_pmt->pcr.i_pcroffset;
- }
- if( i_pts > 0 ) {
+ if( i_pts > VLC_TS_INVALID )
i_pts += p_pmt->pcr.i_pcroffset;
- }
}
- i_dts = TimeStampWrapAround( i_pcr, i_dts );
- i_pts = TimeStampWrapAround( i_pcr, i_pts );
+ if( i_dts > VLC_TS_INVALID )
+ i_dts = TimeStampWrapAround( i_pcr, i_dts );
+ if( i_pts > VLC_TS_INVALID )
+ i_pts = TimeStampWrapAround( i_pcr, i_pts );
- if( i_dts > 0 && i_dts <= i_pcr ) {
- ParsePESDataChain( p_demux, p_pid );
- } else if( i_pts > 0 && i_pts <= i_pcr ) {
+ if(( i_dts > VLC_TS_INVALID && i_dts <= i_pcr ) ||
+ ( i_pts > VLC_TS_INVALID && i_pts <= i_pcr ))
+ {
ParsePESDataChain( p_demux, p_pid );
}
}
More information about the vlc-commits
mailing list