[vlc-commits] lib: use input "state" variable instead of b_dead

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:25:58 2015 +0300| [2772acfee75f05afb3cfe745ec64c9af8cd70270] | committer: Rémi Denis-Courmont

lib: use input "state" variable instead of b_dead

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

 lib/media_player.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/media_player.c b/lib/media_player.c
index 2b340d4..eca77d9 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1376,16 +1376,15 @@ float libvlc_media_player_get_fps( libvlc_media_player_t *p_mi )
 
 int libvlc_media_player_will_play( libvlc_media_player_t *p_mi )
 {
-    bool b_will_play;
     input_thread_t *p_input_thread =
                             libvlc_get_input_thread ( p_mi );
     if ( !p_input_thread )
         return false;
 
-    b_will_play = !p_input_thread->b_dead;
+    int state = var_GetInteger( p_input_thread, "state" );
     vlc_object_release( p_input_thread );
 
-    return b_will_play;
+    return state != END_S && state != ERROR_S;
 }
 
 int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate )



More information about the vlc-commits mailing list