[vlc-commits] lib/media_player: use input vars instead of controls

Thomas Guillem git at videolan.org
Thu Jul 12 12:08:36 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 12 12:02:07 2018 +0200| [25ee5a61f26ffa5bb3892e51410cd1bee5af805b] | committer: Thomas Guillem

lib/media_player: use input vars instead of controls

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

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

diff --git a/lib/media_player.c b/lib/media_player.c
index e293e2cbb0..426ba88903 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -963,7 +963,7 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
     if( p_input_thread )
     {
         /* A thread already exists, send it a play message */
-        input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
+        var_SetInteger( p_input_thread, "state", PLAYING_S );
         unlock_input( p_mi );
         return 0;
     }
@@ -1029,13 +1029,13 @@ void libvlc_media_player_set_pause( libvlc_media_player_t *p_mi, int paused )
     if( paused )
     {
         if( libvlc_media_player_can_pause( p_mi ) )
-            input_Control( p_input_thread, INPUT_SET_STATE, PAUSE_S );
+            var_SetInteger( p_input_thread, "state", PAUSE_S );
         else
             input_Stop( p_input_thread );
     }
     else
     {
-        input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
+        var_SetInteger( p_input_thread, "state", PLAYING_S );
     }
 
     vlc_object_release( p_input_thread );



More information about the vlc-commits mailing list