From 81a42a9e4379362412fc379be0b973eb3ce339ef Mon Sep 17 00:00:00 2001 From: Sebastien Zwickert Date: Tue, 23 Mar 2010 00:13:07 +0100 Subject: [PATCH] VLCKit: remove the prefix from the parameter value and take into account null values for options that do not require a value. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Felix Paul Kühne --- projects/macosx/framework/Sources/VLCMedia.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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]; } -- 2.39.2