[vlc-commits] sout: change first dts test

Francois Cartegnie git at videolan.org
Fri May 4 19:44:58 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May  4 15:26:23 2018 +0200| [5e64072f79f318ccb714b1b2c4efab2e83bae689] | committer: Francois Cartegnie

sout: change first dts test

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e64072f79f318ccb714b1b2c4efab2e83bae689
---

 src/stream_output/stream_output.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index bdfeb24f20..65ab0b5ebd 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -372,7 +372,7 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
 
     p_mux->b_add_stream_any_time = false;
     p_mux->b_waiting_stream = true;
-    p_mux->i_add_stream_start = -1;
+    p_mux->i_add_stream_start = VLC_TS_INVALID;
 
     p_mux->p_module =
         module_need( p_mux, "sout mux", p_mux->psz_mux, true );
@@ -540,11 +540,11 @@ int sout_MuxSendBuffer( sout_mux_t *p_mux, sout_input_t *p_input,
     {
         const int64_t i_caching = var_GetInteger( p_mux->p_sout, "sout-mux-caching" ) * INT64_C(1000);
 
-        if( p_mux->i_add_stream_start < 0 )
+        if( p_mux->i_add_stream_start == VLC_TS_INVALID )
             p_mux->i_add_stream_start = i_dts;
 
         /* Wait until we have enough data before muxing */
-        if( p_mux->i_add_stream_start < 0 ||
+        if( p_mux->i_add_stream_start == VLC_TS_INVALID ||
             i_dts < p_mux->i_add_stream_start + i_caching )
             return VLC_SUCCESS;
         p_mux->b_waiting_stream = false;



More information about the vlc-commits mailing list