[vlc-commits] demux: ts: don't compute pcr offset from non video/audio

Francois Cartegnie git at videolan.org
Wed Jul 6 19:06:46 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul  6 19:05:32 2016 +0200| [c2a9ddc9f5a6241ff2f35908203ccf28beae20d3] | committer: Francois Cartegnie

demux: ts: don't compute pcr offset from non video/audio

refs #17148

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2a9ddc9f5a6241ff2f35908203ccf28beae20d3
---

 modules/demux/mpeg/ts.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index ab07a06..b6ce759 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -1423,7 +1423,8 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
 
                 /* Compute PCR/DTS offset if any */
                 if( p_pmt->pcr.i_pcroffset == -1 && p_block->i_dts > VLC_TS_INVALID &&
-                    p_pmt->pcr.i_current > VLC_TS_INVALID )
+                    p_pmt->pcr.i_current > VLC_TS_INVALID &&
+                   (p_es->fmt.i_cat == VIDEO_ES || p_es->fmt.i_cat == AUDIO_ES) )
                 {
                     int64_t i_dts27 = (p_block->i_dts - VLC_TS_0) * 9 / 100;
                     int64_t i_pcr = TimeStampWrapAround( p_pmt->pcr.i_first, p_pmt->pcr.i_current );



More information about the vlc-commits mailing list