[Android] Media: fix uppercase media extension detection

Adrien Maglo git at videolan.org
Tue Jul 8 18:03:56 CEST 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Jul  8 18:03:48 2014 +0200| [14bb42d27baef44c2d9ad2c7846133b7e3f2c8d9] | committer: Adrien Maglo

Media: fix uppercase media extension detection

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

 vlc-android/src/org/videolan/libvlc/Media.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/libvlc/Media.java b/vlc-android/src/org/videolan/libvlc/Media.java
index ac9887c..33b1eae 100644
--- a/vlc-android/src/org/videolan/libvlc/Media.java
+++ b/vlc-android/src/org/videolan/libvlc/Media.java
@@ -169,7 +169,7 @@ public class Media implements Comparable<Media> {
         if (mType == TYPE_ALL) {
             int dotIndex = mLocation.lastIndexOf(".");
             if (dotIndex != -1) {
-                String fileExt = mLocation.substring(dotIndex);
+                String fileExt = mLocation.substring(dotIndex).toLowerCase(Locale.ENGLISH);
                 if( Media.VIDEO_EXTENSIONS.contains(fileExt) ) {
                     mType = TYPE_VIDEO;
                 } else if (Media.AUDIO_EXTENSIONS.contains(fileExt)) {



More information about the Android mailing list