[Android] VideoPlayerActivity: fix OutOfRangeException
Edward Wang
git at videolan.org
Thu Aug 29 18:26:36 CEST 2013
vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Aug 29 15:40:03 2013 +0200| [4204f93b76b08ea5353011116b6a5c69fa05b488] | committer: Edward Wang
VideoPlayerActivity: fix OutOfRangeException
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4204f93b76b08ea5353011116b6a5c69fa05b488
---
vlc-android/src/org/videolan/vlc/AudioService.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index d338299..13d370c 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -460,7 +460,10 @@ public class AudioService extends Service {
private void handleVout() {
Log.i(TAG, "Obtained video track");
+ String title = getCurrentMedia().getTitle();
+ String MRL = mLibVLC.getMediaList().getMRL(mCurrentIndex);
mMetadataCache.clear();
+ mCurrentIndex = -1;
// Preserve playback when switching to video
hideNotification(false);
@@ -468,7 +471,7 @@ public class AudioService extends Service {
if(!mLibVLC.isPlaying()) return;
// Switch to the video player & don't lose the currently playing stream
- VideoPlayerActivity.start(VLCApplication.getAppContext(), mLibVLC.getMediaList().getMRL(mCurrentIndex), getCurrentMedia().getTitle(), true);
+ VideoPlayerActivity.start(VLCApplication.getAppContext(), MRL, title, true);
}
private void executeUpdate() {
More information about the Android
mailing list