[vlc-commits] input: remove input_thread_t.b_error

Rémi Denis-Courmont git at videolan.org
Fri Jun 5 21:34:07 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun  5 22:18:18 2015 +0300| [af922d5e6c457f677657da8d390fcd6958da2a0a] | committer: Rémi Denis-Courmont

input: remove input_thread_t.b_error

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

 include/vlc_input.h |    1 -
 src/input/input.c   |   14 +++++---------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 748faaf..04f0ddf 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -225,7 +225,6 @@ struct input_thread_t
 {
     VLC_COMMON_MEMBERS
 
-    bool b_error VLC_DEPRECATED;
     bool b_preparsing;
     bool b_dead VLC_DEPRECATED;
 
diff --git a/src/input/input.c b/src/input/input.c
index a24bf7f..5b1327c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -685,7 +685,7 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
     bool b_pause_after_eof = b_interactive &&
                              var_InheritBool( p_input, "play-and-pause" );
 
-    while( vlc_object_alive( p_input ) && !p_input->b_error )
+    while( vlc_object_alive( p_input ) && p_input->p->i_state != ERROR_S )
     {
         mtime_t i_wakeup = -1;
         bool b_paused = p_input->p->i_state == PAUSE_S;
@@ -2810,17 +2810,13 @@ static void InputGetExtraFiles( input_thread_t *p_input,
 /* */
 static void input_ChangeState( input_thread_t *p_input, int i_state )
 {
-    const bool b_changed = p_input->p->i_state != i_state;
+    if( p_input->p->i_state == i_state )
+        return;
 
     p_input->p->i_state = i_state;
     if( i_state == ERROR_S )
-        p_input->b_error = true;
-
-    if( b_changed )
-    {
-        input_item_SetErrorWhenReading( p_input->p->p_item, p_input->b_error );
-        input_SendEventState( p_input, i_state );
-    }
+        input_item_SetErrorWhenReading( p_input->p->p_item, true );
+    input_SendEventState( p_input, i_state );
 }
 
 



More information about the vlc-commits mailing list