[Android] Video player: check audiomanager is not null

Geoffrey Métais git at videolan.org
Thu Jan 24 16:47:47 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 24 16:46:00 2019 +0100| [fd8a7a453df12068fa6b33bbdeb8004128e69c34] | committer: Geoffrey Métais

Video player: check audiomanager is not null

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 4ad3a1110..3dbde5a9c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -720,7 +720,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
     private void setPlaybackParameters() {
         if (mAudioDelay != 0L && mAudioDelay != mService.getAudioDelay())
             mService.setAudioDelay(mAudioDelay);
-        else if (mAudioManager.isBluetoothA2dpOn() || mAudioManager.isBluetoothScoOn())
+        else if (mAudioManager != null && (mAudioManager.isBluetoothA2dpOn() || mAudioManager.isBluetoothScoOn()))
             toggleBtDelay(true);
         if (mSpuDelay != 0L && mSpuDelay != mService.getSpuDelay())
             mService.setSpuDelay(mSpuDelay);



More information about the Android mailing list