[vlc-commits] oldrc: use input "state" variable instead of b_dead
Rémi Denis-Courmont
git at videolan.org
Fri Jun 5 21:34:08 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 5 22:33:09 2015 +0300| [ed69f1dcc86c8a519ef507311cf3771eb2fb1d6d] | committer: Rémi Denis-Courmont
oldrc: use input "state" variable instead of b_dead
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed69f1dcc86c8a519ef507311cf3771eb2fb1d6d
---
modules/control/oldrc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c
index 1afbd78..a3ccb5b 100644
--- a/modules/control/oldrc.c
+++ b/modules/control/oldrc.c
@@ -524,8 +524,11 @@ static void *Run( void *data )
var_AddCallback( p_sys->p_input, "intf-event", InputEvent, p_intf );
}
}
-#warning This is not reliable...
- else if( p_sys->p_input->b_dead )
+
+ int state;
+ if( p_sys->p_input != NULL
+ && ((state = var_GetInteger( p_sys->p_input, "state")) == ERROR_S
+ || state == END_S) )
{
var_DelCallback( p_sys->p_input, "intf-event", InputEvent, p_intf );
vlc_object_release( p_sys->p_input );
More information about the vlc-commits
mailing list