[vlc-commits] mux: ts: don't set negative PCR
Francois Cartegnie
git at videolan.org
Fri Apr 1 19:46:42 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 1 17:31:03 2016 +0200| [c1e9d41e2b690c84571e4a682e9e49fb9e700c25] | committer: Francois Cartegnie
mux: ts: don't set negative PCR
ebcc69cfb1569a0fcedf10498606b231ae6fcb7c offseted dts/pcr to have
it start from zero, but as pcr is offseted from dts by dts delay,
the first PCR are negative and written/overflowing as a value
before a 33bits timestamp wrap.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1e9d41e2b690c84571e4a682e9e49fb9e700c25
---
modules/mux/mpeg/ts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 9c09f1a..039da28 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -1325,7 +1325,7 @@ static bool MuxStreams(sout_mux_t *p_mux )
p_data->i_length = 1000;
if (p_sys->first_dts == 0)
- p_sys->first_dts = p_data->i_dts;
+ p_sys->first_dts = p_data->i_dts - p_sys->i_dts_delay;
if( ( p_pcr_stream->state.i_pes_dts > 0 &&
p_data->i_dts - 10 * CLOCK_FREQ > p_pcr_stream->state.i_pes_dts +
More information about the vlc-commits
mailing list