vlc | branch: master | Zhao Zhili <quinkbl...@foxmail.com> | Thu Aug 31 14:47:13 2017 +0800| [dd26ae7ed9ba9772fa1e924593a24d56afce733d] | committer: Jean-Baptiste Kempf
demux: avformat: fix incorrect PCR If DTS of the first frame is invalid, then p_sys->tk_pcr[i] is invalid, and the previous code will set PCR to INT64_MAX. Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd26ae7ed9ba9772fa1e924593a24d56afce733d --- modules/demux/avformat/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index 121e177f06..356c73f1f7 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -819,7 +819,7 @@ static int Demux( demux_t *p_demux ) if( p_sys->tk_pcr[i] > VLC_TS_INVALID && p_sys->tk_pcr[i] + 10 * CLOCK_FREQ >= i_ts_max ) i_ts_min = __MIN( i_ts_min, p_sys->tk_pcr[i] ); } - if( i_ts_min >= p_sys->i_pcr ) + if( i_ts_min >= p_sys->i_pcr && likely(i_ts_min != INT64_MAX) ) { p_sys->i_pcr = i_ts_min; es_out_SetPCR( p_demux->out, p_sys->i_pcr ); _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits