[vlc-commits] commit: VLCKit: remove the prefix from the parameter value and take into account null values for options that do not require a value . (Sebastien Zwickert )

git at videolan.org git at videolan.org
Tue Mar 23 12:14:23 CET 2010


vlc | branch: master | Sebastien Zwickert <dilaroga at free.fr> | Tue Mar 23 00:13:07 2010 +0100| [81a42a9e4379362412fc379be0b973eb3ce339ef] | committer: Felix Paul Kühne 

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 <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=81a42a9e4379362412fc379be0b973eb3ce339ef
---

 projects/macosx/framework/Sources/VLCMedia.m |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m
index 3f2f161..8d0d203 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];
 }



More information about the vlc-commits mailing list