[vlc-commits] demux: ps: fix missing dts on a52 and others
Francois Cartegnie
git at videolan.org
Wed Apr 25 11:53:20 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Apr 25 11:49:06 2018 +0200| [156dc27803b6cfa7de1bb1f83634554a70254248] | committer: Francois Cartegnie
demux: ps: fix missing dts on a52 and others
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=156dc27803b6cfa7de1bb1f83634554a70254248
---
modules/demux/mpeg/ps.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/demux/mpeg/ps.h b/modules/demux/mpeg/ps.h
index aa107a093f..d0e7c5f9ab 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -519,6 +519,10 @@ static inline int ps_pkt_parse_pes( vlc_object_t *p_object, block_t *p_pes, int
p_pes->p_buffer += i_skip;
p_pes->i_buffer -= i_skip;
+ /* ISO/IEC 13818-1 2.7.5: if no pts and no dts, then dts == pts */
+ if( i_pts >= 0 && i_dts < 0 )
+ i_dts = i_pts;
+
if( i_dts >= 0 )
p_pes->i_dts = FROM_SCALE( i_dts );
if( i_pts >= 0 )
More information about the vlc-commits
mailing list