From 4c49d3e1db6470350f03c6bcc9db6ce40b7a669e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Fri, 31 May 2013 12:49:22 +0200 Subject: [PATCH] TS mux: use DTS if PTS is not available Ensure video can be decoded by VLC --- modules/mux/mpeg/ts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index 13edb25a4b..4703a92840 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -1286,6 +1286,8 @@ static bool MuxStreams(sout_mux_t *p_mux ) || p_input->p_fmt->i_codec != VLC_CODEC_MPGA ) { p_data = block_FifoGet( p_input->p_fifo ); + if (p_data->i_pts <= VLC_TS_INVALID) + p_data->i_pts = p_data->i_dts; if( p_input->p_fmt->i_codec == VLC_CODEC_MP4A ) p_data = Add_ADTS( p_data, p_input->p_fmt ); -- 2.39.2