Commit 089fb216 authored by Rafaël Carré's avatar Rafaël Carré

TS Mux: cosmetics, deintend

parent 7406b9de
...@@ -1257,13 +1257,11 @@ static bool MuxStreams(sout_mux_t *p_mux ) ...@@ -1257,13 +1257,11 @@ static bool MuxStreams(sout_mux_t *p_mux )
block_t *p_data; block_t *p_data;
if( p_stream == p_pcr_stream || p_sys->b_data_alignment if( p_stream == p_pcr_stream || p_sys->b_data_alignment
|| p_input->p_fmt->i_codec != || p_input->p_fmt->i_codec != VLC_CODEC_MPGA )
VLC_CODEC_MPGA )
{ {
p_data = block_FifoGet( p_input->p_fifo ); p_data = block_FifoGet( p_input->p_fifo );
if( p_input->p_fmt->i_codec == if( p_input->p_fmt->i_codec == VLC_CODEC_MP4A )
VLC_CODEC_MP4A )
p_data = Add_ADTS( p_data, p_input->p_fmt ); p_data = Add_ADTS( p_data, p_input->p_fmt );
} }
else else
...@@ -1462,8 +1460,7 @@ static bool MuxStreams(sout_mux_t *p_mux ) ...@@ -1462,8 +1460,7 @@ static bool MuxStreams(sout_mux_t *p_mux )
continue; continue;
} }
if( i_stream == -1 || if( i_stream == -1 || p_stream->i_pes_dts < i_dts )
p_stream->i_pes_dts < i_dts )
{ {
i_stream = i; i_stream = i;
i_dts = p_stream->i_pes_dts; i_dts = p_stream->i_pes_dts;
...@@ -1666,9 +1663,9 @@ static void TSSchedule( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts, ...@@ -1666,9 +1663,9 @@ static void TSSchedule( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
BufferChainAppend( &new_chain, p_ts ); BufferChainAppend( &new_chain, p_ts );
if( p_ts->i_dts && if (!p_ts->i_dts || p_ts->i_dts + p_sys->i_dts_delay * 2/3 >= i_new_dts)
p_ts->i_dts + p_sys->i_dts_delay * 2/3 < i_new_dts ) continue;
{
mtime_t i_max_diff = i_new_dts - p_ts->i_dts; mtime_t i_max_diff = i_new_dts - p_ts->i_dts;
mtime_t i_cut_dts = p_ts->i_dts; mtime_t i_cut_dts = p_ts->i_dts;
...@@ -1690,16 +1687,12 @@ static void TSSchedule( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts, ...@@ -1690,16 +1687,12 @@ static void TSSchedule( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
i_cut_dts - i_pcr_dts, i_pcr_length, new_chain.i_depth, i_cut_dts - i_pcr_dts, i_pcr_length, new_chain.i_depth,
p_chain_ts->i_depth ); p_chain_ts->i_depth );
if ( new_chain.i_depth ) if ( new_chain.i_depth )
TSDate( p_mux, &new_chain, TSDate( p_mux, &new_chain, i_cut_dts - i_pcr_dts, i_pcr_dts );
i_cut_dts - i_pcr_dts,
i_pcr_dts );
if ( p_chain_ts->i_depth ) if ( p_chain_ts->i_depth )
TSSchedule( p_mux, TSSchedule( p_mux, p_chain_ts, i_pcr_dts + i_pcr_length - i_cut_dts,
p_chain_ts, i_pcr_dts + i_pcr_length - i_cut_dts,
i_cut_dts ); i_cut_dts );
return; return;
} }
}
if ( new_chain.i_depth ) if ( new_chain.i_depth )
TSDate( p_mux, &new_chain, i_pcr_length, i_pcr_dts ); TSDate( p_mux, &new_chain, i_pcr_length, i_pcr_dts );
......
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