[vlc-devel] [PATCH] mux: ts: set p_sys->first_dts to lowest dts recieved

Ray Tiley raytiley at gmail.com
Wed Jun 11 05:32:21 CEST 2014


This fixes an issue where all packets will be ignored as having too
strange dts. This is because when a stream is frist starting a high
dts value may come in and cause the all following packets to be
dropped.
---
 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 6d58b58..977e544 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -1317,7 +1317,7 @@ static bool MuxStreams(sout_mux_t *p_mux )
                    VLC_CODEC_SUBT )
             p_data->i_length = 1000;
 
-        if (p_sys->first_dts == 0)
+        if (p_sys->first_dts == 0 || p_data->i_dts < p_sys->first_dts )
             p_sys->first_dts = p_data->i_dts;
 
         p_data->i_dts -= p_sys->first_dts;
-- 
1.9.1




More information about the vlc-devel mailing list