[Android] Revert "New constructor for MediaWrapper"

Geoffrey Métais git at videolan.org
Mon Feb 9 11:40:41 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb  9 11:38:26 2015 +0100| [752a59ad1585eebc0ca290bc5921681e6bbabb6c] | committer: Geoffrey Métais

Revert "New constructor for MediaWrapper"

This reverts commit bdf35efd26fd0ec278cf41677ef3bd9b8cc7d816.

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

 vlc-android/src/org/videolan/vlc/MediaWrapper.java |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
index c3d57e3..6c65e18 100644
--- a/vlc-android/src/org/videolan/vlc/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
@@ -100,19 +100,18 @@ public class MediaWrapper implements Parcelable {
     }
 
     private void init(Media media) {
-
         mType = TYPE_ALL;
 
         if (media != null) {
-            mLength = media.getDuration();
-
             if (media.isParsed()) {
+                mLength = media.getDuration();
+
                 for (int i = 0; i < media.getTrackCount(); ++i) {
                     final Media.Track track = media.getTrack(i);
                     if (track == null)
                         continue;
                     if (track.type == Media.Track.Type.Video) {
-                        final VideoTrack videoTrack = (VideoTrack) track;
+                        final Media.VideoTrack videoTrack = (VideoTrack) track;
                         mType = TYPE_VIDEO;
                         mWidth = videoTrack.width;
                         mHeight = videoTrack.height;



More information about the Android mailing list