MacOSX/Framework/VLCMediaDiscoverer.m: Use UTF8String instead of cString.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 11 Dec 2007 15:38:46 +0000 (15:38 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 11 Dec 2007 15:38:46 +0000 (15:38 +0000)
extras/MacOSX/Framework/Sources/VLCMediaDiscoverer.m

index 40fbc9f..6bfa83e 100644 (file)
@@ -53,7 +53,7 @@ static NSArray * availableMediaDiscoverer = nil;
         localizedName = nil;
         discoveredMedia = nil;
         mdis = libvlc_media_discoverer_new_from_name( [VLCLibrary sharedInstance],
-                                                      [aServiceName cString],
+                                                      [aServiceName UTF8String],
                                                       &ex );
         quit_on_exception( &ex );       
     }
@@ -96,7 +96,7 @@ static NSArray * availableMediaDiscoverer = nil;
 
     if (name)
     {
-        aString = [NSString stringWithCString:name encoding:NSUTF8StringEncoding];
+        aString = [NSString stringWithUTF8String:name];
         free( name );
     }
     if( aString )