Commit dcaafd94 authored by Laurent Aimar's avatar Laurent Aimar

Do not uselessly duplicated code (input)

parent 51540587
...@@ -510,23 +510,6 @@ static void* Run( vlc_object_t *p_this ) ...@@ -510,23 +510,6 @@ static void* Run( vlc_object_t *p_this )
MainLoop( p_input ); MainLoop( p_input );
if( !p_input->b_eof && !p_input->b_error && p_input->p->input.b_eof )
{
/* We have finish to demux data but not to play them */
while( !p_input->b_die )
{
if( input_EsOutDecodersEmpty( p_input->p->p_es_out ) )
break;
msg_Dbg( p_input, "waiting decoder fifos to empty" );
msleep( INPUT_IDLE_SLEEP );
}
/* We have finished */
input_ChangeState( p_input, END_S );
}
/* Wait until we are asked to die */ /* Wait until we are asked to die */
if( !p_input->b_die ) if( !p_input->b_die )
{ {
...@@ -557,23 +540,6 @@ static void* RunAndDestroy( vlc_object_t *p_this ) ...@@ -557,23 +540,6 @@ static void* RunAndDestroy( vlc_object_t *p_this )
MainLoop( p_input ); MainLoop( p_input );
if( !p_input->b_eof && !p_input->b_error && p_input->p->input.b_eof )
{
/* We have finished demuxing data but not playing it */
while( !p_input->b_die )
{
if( input_EsOutDecodersEmpty( p_input->p->p_es_out ) )
break;
msg_Dbg( p_input, "waiting decoder fifos to empty" );
msleep( INPUT_IDLE_SLEEP );
}
/* We have finished */
input_ChangeState( p_input, END_S );
}
/* Clean up */ /* Clean up */
End( p_input ); End( p_input );
...@@ -759,6 +725,23 @@ static void MainLoop( input_thread_t *p_input ) ...@@ -759,6 +725,23 @@ static void MainLoop( input_thread_t *p_input )
} }
} }
} }
if( !p_input->b_eof && !p_input->b_error && p_input->p->input.b_eof )
{
/* We have finish to demux data but not to play them */
while( !p_input->b_die )
{
if( input_EsOutDecodersEmpty( p_input->p->p_es_out ) )
break;
msg_Dbg( p_input, "waiting decoder fifos to empty" );
msleep( INPUT_IDLE_SLEEP );
}
/* We have finished */
input_ChangeState( p_input, END_S );
}
} }
static void InitStatistics( input_thread_t * p_input ) static void InitStatistics( input_thread_t * p_input )
......
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