[vlc-commits] demux: ps: fix missing dts on a52 and others

Francois Cartegnie git at videolan.org
Fri Apr 27 15:32:59 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Apr 25 11:49:06 2018 +0200| [55a42db2343fb94709ddfef6f0af0939b5538d83] | committer: Hugo Beauzée-Luyssen

demux: ps: fix missing dts on a52 and others

(cherry picked from commit 156dc27803b6cfa7de1bb1f83634554a70254248)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 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 6d3d5c4662..c73309e9be 100644
--- a/modules/demux/mpeg/ps.h
+++ b/modules/demux/mpeg/ps.h
@@ -520,6 +520,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