[vlc-devel] commit: Do not uselessly duplicated code (input) (Laurent Aimar )
git version control
git at videolan.org
Sun Sep 7 22:18:46 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Sep 7 21:45:47 2008 +0200| [dcaafd942c6c16608279a4312398fb747531ac2e] | committer: Laurent Aimar
Do not uselessly duplicated code (input)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dcaafd942c6c16608279a4312398fb747531ac2e
---
src/input/input.c | 51 +++++++++++++++++----------------------------------
1 files changed, 17 insertions(+), 34 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 464226c..bd649ed 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -510,23 +510,6 @@ static void* Run( vlc_object_t *p_this )
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 */
if( !p_input->b_die )
{
@@ -557,23 +540,6 @@ static void* RunAndDestroy( vlc_object_t *p_this )
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 */
End( 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 )
More information about the vlc-devel
mailing list