[Android] Remove harmful mrl conversion

Geoffrey Métais git at videolan.org
Wed Mar 13 11:11:57 CET 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 11 16:05:33 2019 +0100| [28735d955f3a0f916821b8653981f7bc502085d7] | committer: Geoffrey Métais

Remove harmful mrl conversion

> https://code.videolan.org/videolan/vlc-android/commit/28735d955f3a0f916821b8653981f7bc502085d7
---

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 1c3bbb8c6..b408a3b7d 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -293,7 +293,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
                 return
             }
             val start = getStartTime(mw)
-            val media = Media(VLCInstance.get(), formatUri(uri))
+            val media = Media(VLCInstance.get(), uri)
             media.addOption(":start-time=$start")
             VLCOptions.setMediaOptions(media, ctx, flags or mw.flags)
             /* keeping only video during benchmark */
@@ -330,12 +330,6 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
         }
     }
 
-    private fun formatUri(uri: Uri) : Uri {
-        if (uri.scheme == "file" || uri.scheme == "fd") return uri
-        val mrl = Uri.decode(uri.toString())
-        return Uri.parse(mrl)
-    }
-
     private fun skipMedia() {
         if (currentIndex != nextIndex) next()
         else stop(false)



More information about the Android mailing list