libvlc: don't check current state in libvlc_media_player_set_pause
commitfe0668c889117eff61444af22fd9e37461b806ca
authorZhao Zhili <quinkblack@foxmail.com>
Thu, 28 Sep 2017 02:34:20 +0000 (28 10:34 +0800)
committerThomas Guillem <thomas@gllm.fr>
Fri, 29 Sep 2017 07:36:50 +0000 (29 09:36 +0200)
treeadad1c674ce2989fd46a70c3c2ea7ae6204f1f09
parentb1ea27b2cd9e6ae6a14174e651d68968f1f1bc1c
libvlc: don't check current state in libvlc_media_player_set_pause

Since input_Control is executed asynchronously, current state may be
different to the state when INPUT_SET_STATE executing. Here is a use
case which is broken by check current state in
libvlc_media_player_set_pause():

1. current state is paused
2. call libvlc_media_player_play()
3. call libvlc_media_player_set_pause() immediately before
INPUT_SET_STATE PLAYING_S is executed, libvlc_media_player_set_pause()
will do nothing, so it looks like the pause request is been dropped
silently

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
lib/media_player.c