[Android] Return dummy playback rate when stopped

Geoffrey Métais git at videolan.org
Wed Jun 13 12:06:25 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jun 13 11:36:47 2018 +0200| [db9b061113d8dcd5d8e63662be1d30ec1cc12bf3] | committer: Geoffrey Métais

Return dummy playback rate when stopped

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

 vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index 1538f03b0..7b87d564a 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -139,7 +139,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
 
     fun getSpuDelay() = mediaplayer.spuDelay
 
-    fun getRate() = if (mediaplayer.hasMedia()) mediaplayer.rate else 1.0f
+    fun getRate() = if (mediaplayer.hasMedia() && playbackState != PlaybackStateCompat.STATE_STOPPED) mediaplayer.rate else 1.0f
 
     fun setSpuDelay(delay: Long) = mediaplayer.setSpuDelay(delay)
 



More information about the Android mailing list