[vlc-commits] mux:ps: use MPEG timestamp macros

Steve Lhomme git at videolan.org
Tue Sep 18 14:30:35 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 12 14:41:34 2018 +0200| [772a6106969e22ad048406fbee1ed1612072e277] | committer: Steve Lhomme

mux:ps: use MPEG timestamp macros

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

 modules/mux/mpeg/ps.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/mux/mpeg/ps.c b/modules/mux/mpeg/ps.c
index 12eaff53f0..d43a1b5340 100644
--- a/modules/mux/mpeg/ps.c
+++ b/modules/mux/mpeg/ps.c
@@ -40,6 +40,8 @@
 #include "bits.h"
 #include "pes.h"
 
+#include "../../demux/mpeg/timestamps.h"
+
 #include <vlc_iso_lang.h>
 
 /*****************************************************************************
@@ -592,10 +594,10 @@ static void MuxWritePackHeader( sout_mux_t *p_mux, block_t **p_buf,
     sout_mux_sys_t *p_sys = p_mux->p_sys;
     bits_buffer_t bits;
     block_t *p_hdr;
-    vlc_tick_t i_scr;
+    int64_t i_scr;
     int i_mux_rate;
 
-    i_scr = (i_dts - p_sys->i_dts_delay) * 9 / 100;
+    i_scr = TO_SCALE_NZ(i_dts - p_sys->i_dts_delay);
 
     p_hdr = block_Alloc( 18 );
     if( !p_hdr )



More information about the vlc-commits mailing list