]> git.sesse.net Git - vlc/commitdiff
VLCKit: remove the prefix from the parameter value and take into account null values...
authorSebastien Zwickert <dilaroga@free.fr>
Mon, 22 Mar 2010 23:13:07 +0000 (00:13 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 23 Mar 2010 11:13:47 +0000 (12:13 +0100)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
projects/macosx/framework/Sources/VLCMedia.m

index 3f2f1612539d155462adc1802ee699cbc851a27f..8d0d20324ea3b115559d4f03a6e8c6085b212006 100644 (file)
@@ -357,7 +357,11 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
 
     for( NSString * key in [options allKeys] )
     {
-        libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=#%@", key, [options objectForKey:key]] UTF8String]);
+        if ( [options objectForKey:key] != [NSNull null] )
+            libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=%@", key, [options objectForKey:key]] UTF8String]);
+        else
+            libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@", key] UTF8String]);
+
     }
     return [VLCMedia mediaWithLibVLCMediaDescriptor:p_md];
 }