diff options
author | Domingos Lopes <domingos86lopes+github@gmail.com> | 2016-03-27 20:01:15 -0400 |
---|---|---|
committer | Domingos Lopes <domingos86lopes+github@gmail.com> | 2016-04-23 21:39:56 -0400 |
commit | c915366c7b813e1d51f8bd992d334f6e7e675212 (patch) | |
tree | b4bbe53bafd0a64f07976054c041f495d4731fbf /core/src | |
parent | f79369a9ad3fc882326d40a2c64e7192b482a079 (diff) | |
download | AntennaPod-c915366c7b813e1d51f8bd992d334f6e7e675212.zip |
account for when MediaStatus returned from RemoteMediaPlayer is null
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java index 7ed5a2fd9..7ca9149fd 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java @@ -81,6 +81,11 @@ public class RemotePSMP extends PlaybackServiceMediaPlayer { @Override public void onRemoteMediaPlayerStatusUpdated() { MediaStatus status = castMgr.getMediaStatus(); + if (status == null) { + setBuffering(false); + setPlayerStatus(PlayerStatus.INDETERMINATE, null); + return; + } Playable currentMedia = localVersion(status.getMediaInfo()); long position = status.getStreamPosition(); if (position > 0 && currentMedia.getPosition()==0) { |