[Android] libVLC: pause() is not toggling anymore

Thomas Guillem git at videolan.org
Thu Mar 10 10:53:47 CET 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 10 10:51:21 2016 +0100| [0a733a7d9467fc056f7235b2bfad7023e39449fe] | committer: Thomas Guillem

libVLC: pause() is not toggling anymore

> https://code.videolan.org/videolan/vlc-android/commit/0a733a7d9467fc056f7235b2bfad7023e39449fe
---

 libvlc/jni/libvlcjni-mediaplayer.c                    | 2 +-
 libvlc/src/org/videolan/libvlc/media/MediaPlayer.java | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libvlc/jni/libvlcjni-mediaplayer.c b/libvlc/jni/libvlcjni-mediaplayer.c
index f1cc35e..8bf07a5 100644
--- a/libvlc/jni/libvlcjni-mediaplayer.c
+++ b/libvlc/jni/libvlcjni-mediaplayer.c
@@ -291,7 +291,7 @@ Java_org_videolan_libvlc_MediaPlayer_pause(JNIEnv *env, jobject thiz)
     if (!p_obj)
         return;
 
-    libvlc_media_player_pause(p_obj->u.p_mp);
+    libvlc_media_player_set_pause(p_obj->u.p_mp, 1);
 }
 
 jint
diff --git a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
index 9cc527b..4ee499e 100644
--- a/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/media/MediaPlayer.java
@@ -157,8 +157,7 @@ public class MediaPlayer
     }
 
     public void pause() throws IllegalStateException {
-        if (mMediaPlayer.isPlaying())
-            mMediaPlayer.pause(); // FIXME, this is toggling for now.
+        mMediaPlayer.pause();
     }
 
     public void setWakeMode(Context context, int mode) {



More information about the Android mailing list