]> git.sesse.net Git - vlc/commitdiff
TS mux: use DTS if PTS is not available
authorRafaël Carré <funman@videolan.org>
Fri, 31 May 2013 10:49:22 +0000 (12:49 +0200)
committerRafaël Carré <funman@videolan.org>
Tue, 4 Jun 2013 19:11:46 +0000 (21:11 +0200)
Ensure video can be decoded by VLC

modules/mux/mpeg/ts.c

index 13edb25a4bea9c30f9abd57bc45851fa24a8d4bf..4703a92840b06f23f64cb5de143d1d2f09f137e7 100644 (file)
@@ -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 );