[Android] Fix logic fail & no need to unset video track
Geoffrey Métais
git at videolan.org
Fri Jan 26 18:14:26 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 26 18:13:18 2018 +0100| [adfef784113930ea895f1d8635a67b24c4d8653c] | committer: Geoffrey Métais
Fix logic fail & no need to unset video track
> https://code.videolan.org/videolan/vlc-android/commit/adfef784113930ea895f1d8635a67b24c4d8653c
---
vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index 32fc73ce0..809dffa28 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -43,7 +43,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
}
fun pause(): Boolean {
- if (!mediaplayer.hasMedia() && !pausable) return false
+ if (!mediaplayer.hasMedia() || !pausable) return false
mediaplayer.pause()
return true
}
@@ -155,7 +155,6 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
fun release(player: MediaPlayer = mediaplayer) {
player.setEventListener(null)
- player.setVideoTrackEnabled(false)
if (isVideoPlaying()) player.vlcVout.detachViews()
launch(playerContext) { player.release() }
playbackState = PlaybackStateCompat.STATE_STOPPED
More information about the Android
mailing list