[Android] Media: fix postParse when Media is parsed from MediaPlayer
Thomas Guillem
git at videolan.org
Tue Jun 30 17:32:07 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jun 30 17:30:54 2015 +0200| [df266ed34054d28eff3a581c9b3cccb70e435da7] | committer: Thomas Guillem
Media: fix postParse when Media is parsed from MediaPlayer
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=df266ed34054d28eff3a581c9b3cccb70e435da7
---
libvlc/src/org/videolan/libvlc/Media.java | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 6afa87f..c70fac5 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -416,18 +416,15 @@ public class Media extends VLCObject<Media.Event> {
if (isReleased())
throw new IllegalStateException("Media is released");
// fetch if parsed and not fetched
- if ((mParseStatus & PARSE_STATUS_PARSING) != 0
- && (mParseStatus & PARSE_STATUS_PARSED) == 0) {
- mParseStatus &= ~PARSE_STATUS_PARSING;
- mParseStatus |= PARSE_STATUS_PARSED;
- mNativeTracks = nativeGetTracks();
- mNativeMetas = nativeGetMetas();
- if (mNativeMetas != null && mNativeMetas.length != Meta.MAX)
- throw new IllegalStateException("native metas size doesn't match");
- mDuration = nativeGetDuration();
- mState = nativeGetState();
- mType = nativeGetType();
- }
+ mParseStatus &= ~PARSE_STATUS_PARSING;
+ mParseStatus |= PARSE_STATUS_PARSED;
+ mNativeTracks = nativeGetTracks();
+ mNativeMetas = nativeGetMetas();
+ if (mNativeMetas != null && mNativeMetas.length != Meta.MAX)
+ throw new IllegalStateException("native metas size doesn't match");
+ mDuration = nativeGetDuration();
+ mState = nativeGetState();
+ mType = nativeGetType();
}
/**
More information about the Android
mailing list