[vlc-commits] mux:ts: use MPEG timestamp macros
Steve Lhomme
git at videolan.org
Tue Sep 18 14:30:32 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 12 14:39:28 2018 +0200| [66c922a85ea1968256d55b715e3c815c58ad1741] | committer: Steve Lhomme
mux:ts: use MPEG timestamp macros
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66c922a85ea1968256d55b715e3c815c58ad1741
---
modules/mux/Makefile.am | 3 ++-
modules/mux/mpeg/ts.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/mux/Makefile.am b/modules/mux/Makefile.am
index 8b3c29df34..910b72f19b 100644
--- a/modules/mux/Makefile.am
+++ b/modules/mux/Makefile.am
@@ -39,7 +39,8 @@ libmux_ts_plugin_la_SOURCES = \
mux/mpeg/tables.c mux/mpeg/tables.h \
mux/mpeg/tsutil.c mux/mpeg/tsutil.h \
codec/jpeg2000.h \
- mux/mpeg/ts.c mux/mpeg/bits.h mux/mpeg/dvbpsi_compat.h
+ mux/mpeg/ts.c mux/mpeg/bits.h mux/mpeg/dvbpsi_compat.h \
+ demux/mpeg/timestamps.h
libmux_ts_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(DVBPSI_CFLAGS)
libmux_ts_plugin_la_LIBADD = $(DVBPSI_LIBS)
if HAVE_DVBPSI
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 25e27c3e2e..042786b1f7 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -63,6 +63,7 @@
#include "tables.h"
#include "../../codec/jpeg2000.h"
+#include "../../demux/mpeg/timestamps.h"
/*
* TODO:
@@ -1920,7 +1921,7 @@ static block_t *TSNew( sout_mux_t *p_mux, sout_input_sys_t *p_stream,
static void TSSetPCR( block_t *p_ts, vlc_tick_t i_dts )
{
- vlc_tick_t i_pcr = 9 * i_dts / 100;
+ int64_t i_pcr = TO_SCALE_NZ(i_dts);
p_ts->p_buffer[6] = ( i_pcr >> 25 )&0xff;
p_ts->p_buffer[7] = ( i_pcr >> 17 )&0xff;
More information about the vlc-commits
mailing list