From: Sebastien Zwickert Date: Mon, 22 Mar 2010 23:13:07 +0000 (+0100) Subject: VLCKit: remove the prefix from the parameter value and take into account null values... X-Git-Tag: 1.1.0-pre1~321 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=81a42a9e4379362412fc379be0b973eb3ce339ef;p=vlc VLCKit: remove the prefix from the parameter value and take into account null values for options that do not require a value. Signed-off-by: Felix Paul Kühne --- diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m index 3f2f161253..8d0d20324e 100644 --- a/projects/macosx/framework/Sources/VLCMedia.m +++ b/projects/macosx/framework/Sources/VLCMedia.m @@ -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]; }