[Android] Revert "MediaWrapper: remove flags"

Thomas Guillem git at videolan.org
Wed Jul 1 16:03:59 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul  1 15:51:02 2015 +0200| [6f3f2de090e8b8e5662a25cf0d720e2abdcd59ae] | committer: Thomas Guillem

Revert "MediaWrapper: remove flags"

This reverts commit cb99b682dd04ea5a37f5faf8e954630ade83ca48.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6f3f2de090e8b8e5662a25cf0d720e2abdcd59ae
---

 vlc-android/src/org/videolan/vlc/MediaWrapper.java    |   10 ++++++++++
 vlc-android/src/org/videolan/vlc/PlaybackService.java |    2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
index f5366e1..4f56172 100644
--- a/vlc-android/src/org/videolan/vlc/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
@@ -420,6 +420,16 @@ public class MediaWrapper implements Parcelable {
         this.mLastModified = mLastModified;
     }
 
+    public void addFlags(int flags) {
+        mFlags |= flags;
+    }
+    public void setFlags(int flags) {
+        mFlags = flags;
+    }
+    public int getFlags() {
+        return mFlags;
+    }
+
     @Override
     public int describeContents() {
         return 0;
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index da31a1a..f530955 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1502,7 +1502,7 @@ public class PlaybackService extends Service {
         if (!mVideoEnabled)
             flags |= VLCOptions.MEDIA_NO_VIDEO;
         final Media media = new Media(VLCInstance.get(), mw.getUri());
-        VLCOptions.setMediaOptions(media, this, flags);
+        VLCOptions.setMediaOptions(media, this, flags | mw.getFlags());
         media.setEventListener(mMediaListener);
         mMediaPlayer.setMedia(media);
         media.release();



More information about the Android mailing list