[vlc-commits] sout_MuxSendBuffer: use a variable

Rafaël Carré git at videolan.org
Thu Feb 20 18:24:43 CET 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Feb 20 18:24:11 2014 +0100| [8deea3297eba9ddde9c0fe8e608b726bd4584a21] | committer: Rafaël Carré

sout_MuxSendBuffer: use a variable

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

 src/stream_output/stream_output.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 7fdba01..bbc22bd 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -515,14 +515,15 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
 int sout_MuxSendBuffer( sout_mux_t *p_mux, sout_input_t *p_input,
                          block_t *p_buffer )
 {
+    mtime_t i_dts = p_buffer->i_dts;
     block_FifoPut( p_input->p_fifo, p_buffer );
 
     if( p_mux->p_sout->i_out_pace_nocontrol )
     {
         mtime_t current_date = mdate();
-        if ( current_date > p_buffer->i_dts )
+        if ( current_date > i_dts )
             msg_Warn( p_mux, "late buffer for mux input (%"PRId64")",
-                      current_date - p_buffer->i_dts );
+                      current_date - i_dts );
     }
 
     if( p_mux->b_waiting_stream )
@@ -530,11 +531,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 )
-            p_mux->i_add_stream_start = p_buffer->i_dts;
+            p_mux->i_add_stream_start = i_dts;
 
         /* Wait until we have enought data before muxing */
         if( p_mux->i_add_stream_start < 0 ||
-            p_buffer->i_dts < p_mux->i_add_stream_start + i_caching )
+            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