Commit fb7ad320 authored by Laurent Aimar's avatar Laurent Aimar

* input/input_dec.c: we automaticaly switch to minimize thread mode

when streaming (it's better because of the way sout works).
 * stream_output/stream_output.c: when removing a stream, stop waiting
and start muxing if data are already here (needed for sout with pace
control).

 Both will help to allow muxing (nearly?) all frames, even the last ones.
parent c8530848
......@@ -133,8 +133,16 @@ decoder_t * input_RunDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
return NULL;
}
if( !p_es->b_force_decoder && p_input->stream.p_sout )
{
msg_Dbg( p_input, "stream out mode -> no decoder thread" );
p_dec->p_owner->b_own_thread = VLC_FALSE;
}
else
{
var_Get( p_input, "minimize-threads", &val );
p_dec->p_owner->b_own_thread = val.b_bool ? VLC_FALSE : VLC_TRUE;
p_dec->p_owner->b_own_thread = !val.b_bool;
}
if( p_dec->p_owner->b_own_thread )
{
......
......@@ -499,6 +499,14 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
int i_index;
if( p_mux->b_waiting_stream && p_input->p_fifo->i_depth > 0 )
{
/* We stop waiting, and call the muxer for taking care of the data
* before we remove this es */
p_mux->b_waiting_stream = VLC_FALSE;
p_mux->pf_mux( p_mux );
}
TAB_FIND( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input, i_index );
if( i_index >= 0 )
{
......
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