[vlc-commits] input: remove write-only demux-polled flag

Rémi Denis-Courmont git at videolan.org
Sat Feb 21 19:42:15 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 21 19:21:39 2015 +0200| [8cf743d02869333c2b6e3040f1e0a878a3a17ee7] | committer: Rémi Denis-Courmont

input: remove write-only demux-polled flag

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8cf743d02869333c2b6e3040f1e0a878a3a17ee7
---

 src/input/input.c |   25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 9f66169..7de30ec 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -88,7 +88,7 @@ static void InputSourceMeta( input_thread_t *, input_source_t *, vlc_meta_t * );
 
 /* TODO */
 //static void InputGetAttachments( input_thread_t *, input_source_t * );
-static void SlaveDemux( input_thread_t *p_input, bool *pb_demux_polled );
+static void SlaveDemux( input_thread_t *p_input );
 static void SlaveSeek( input_thread_t *p_input );
 
 static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta );
@@ -538,12 +538,11 @@ static void *Run( void *obj )
  * MainLoopDemux
  * It asks the demuxer to demux some data
  */
-static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, bool *pb_demux_polled, mtime_t i_start_mdate )
+static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t i_start_mdate )
 {
     int i_ret;
 
     *pb_changed = false;
-    *pb_demux_polled = p_input->p->input.p_demux->pf_demux != NULL;
 
     if( ( p_input->p->i_stop > 0 && p_input->p->i_time >= p_input->p->i_stop ) ||
         ( p_input->p->i_run > 0 && i_start_mdate+p_input->p->i_run < mdate() ) )
@@ -581,12 +580,7 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, bool *pb_d
     }
 
     if( i_ret > 0 && p_input->p->i_slave > 0 )
-    {
-        bool b_demux_polled;
-        SlaveDemux( p_input, &b_demux_polled );
-
-        *pb_demux_polled |= b_demux_polled;
-    }
+        SlaveDemux( p_input );
 }
 
 static int MainLoopTryRepeat( input_thread_t *p_input, mtime_t *pi_start_mdate )
@@ -685,7 +679,6 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
     while( vlc_object_alive( p_input ) && !p_input->b_error )
     {
         mtime_t i_wakeup = -1;
-        bool b_demux_polled = true;
         bool b_paused = p_input->p->i_state == PAUSE_S;
         /* FIXME if p_input->p->i_state == PAUSE_S the access/access_demux
          * is paused -> this may cause problem with some of them
@@ -699,8 +692,7 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
             {
                 bool b_force_update = false;
 
-                MainLoopDemux( p_input, &b_force_update, &b_demux_polled,
-                               i_start_mdate );
+                MainLoopDemux( p_input, &b_force_update, i_start_mdate );
                 i_wakeup = es_out_GetWakeup( p_input->p->p_es_out );
 
                 if( b_force_update )
@@ -2536,12 +2528,11 @@ static void InputSourceMeta( input_thread_t *p_input,
 }
 
 
-static void SlaveDemux( input_thread_t *p_input, bool *pb_demux_polled )
+static void SlaveDemux( input_thread_t *p_input )
 {
     int64_t i_time;
     int i;
 
-    *pb_demux_polled = false;
     if( demux_Control( p_input->p->input.p_demux, DEMUX_GET_TIME, &i_time ) )
     {
         msg_Err( p_input, "demux doesn't like DEMUX_GET_TIME" );
@@ -2556,12 +2547,6 @@ static void SlaveDemux( input_thread_t *p_input, bool *pb_demux_polled )
         if( in->b_eof )
             continue;
 
-        const bool b_demux_polled = in->p_demux->pf_demux != NULL;
-        if( !b_demux_polled )
-            continue;
-
-        *pb_demux_polled = true;
-
         /* Call demux_Demux until we have read enough data */
         if( demux_Control( in->p_demux, DEMUX_SET_NEXT_DEMUX_TIME, i_time ) )
         {



More information about the vlc-commits mailing list