Explorar el Código

VLCMedia: Remove attempts to encode urls

This removes bugs where urls were wrongly double encoded,
instead the App needs to ensure that the URL is percent encoded if needed
Carola Nitz hace 6 años
padre
commit
1ffd69b806
Se han modificado 1 ficheros con 1 adiciones y 12 borrados
  1. 1 12
      Sources/VLCMedia.m

+ 1 - 12
Sources/VLCMedia.m

@@ -272,12 +272,7 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
         VLCLibrary *library = [VLCLibrary sharedLibrary];
         NSAssert(library.instance, @"no library instance when creating media");
 
-        if (([[anURL absoluteString] hasPrefix:@"sftp://"]) ||
-            ([[anURL absoluteString] hasPrefix:@"smb://"])) {
-            url = [[[anURL absoluteString] stringByRemovingPercentEncoding] UTF8String];
-        } else {
-            url = [[anURL absoluteString] UTF8String];
-        }
+        url = [[anURL absoluteString] UTF8String];
 
         p_md = libvlc_media_new_location(library.instance, url);
 
@@ -956,12 +951,6 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
         return;
     }
 
-    urlString = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    if (!urlString) {
-        free(p_url);
-        return;
-    }
-
     _url = [NSURL URLWithString:urlString];
     if (!_url) /* Attempt to interpret as a file path then */ {
          _url = [NSURL fileURLWithPath:urlString];