[vlc-devel] [PATCH] TS mux: use DTS if PTS is not available

Rafaël Carré funman at videolan.org
Fri May 31 12:50:06 CEST 2013


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 13edb25..549bc36 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 );
-- 
1.8.1.2



More information about the vlc-devel mailing list