Commit 8deea329 authored by Rafaël Carré's avatar Rafaël Carré

sout_MuxSendBuffer: use a variable

parent 35861b06
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment