Commit 7b032f22 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed incorrect URL creation (closes #4966)

parent 3c2992fc
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#import "embeddedwindow.h" #import "embeddedwindow.h"
#import "fspanel.h" #import "fspanel.h"
#import "playlist.h" #import "playlist.h"
#import <vlc_url.h>
/* SetSystemUIMode, ... */ /* SetSystemUIMode, ... */
#import <Carbon/Carbon.h> #import <Carbon/Carbon.h>
...@@ -904,7 +905,13 @@ ...@@ -904,7 +905,13 @@
for( i = 0; i < (int)[o_values count]; i++) for( i = 0; i < (int)[o_values count]; i++)
{ {
NSDictionary *o_dic; NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"]; char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
if( !psz_uri )
continue;
o_dic = [NSDictionary dictionaryWithObject:[NSString stringWithCString:psz_uri encoding:NSUTF8StringEncoding] forKey:@"ITEM_URL"];
free( psz_uri );
o_array = [o_array arrayByAddingObject: o_dic]; o_array = [o_array arrayByAddingObject: o_dic];
} }
if( b_autoplay ) if( b_autoplay )
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#import "misc.h" #import "misc.h"
#import "playlist.h" #import "playlist.h"
#import "controls.h" #import "controls.h"
#import <vlc_url.h>
/***************************************************************************** /*****************************************************************************
* NSImage (VLCAdditions) * NSImage (VLCAdditions)
...@@ -510,7 +511,13 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -510,7 +511,13 @@ static NSMutableArray *blackoutWindows = NULL;
for( i = 0; i < (int)[o_values count]; i++) for( i = 0; i < (int)[o_values count]; i++)
{ {
NSDictionary *o_dic; NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"]; char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
if( !psz_uri )
continue;
o_dic = [NSDictionary dictionaryWithObject:[NSString stringWithCString:psz_uri encoding:NSUTF8StringEncoding] forKey:@"ITEM_URL"];
free( psz_uri );
o_array = [o_array arrayByAddingObject: o_dic]; o_array = [o_array arrayByAddingObject: o_dic];
} }
[(VLCPlaylist *)[[VLCMain sharedInstance] playlist] appendArray: o_array atPos: -1 enqueue:NO]; [(VLCPlaylist *)[[VLCMain sharedInstance] playlist] appendArray: o_array atPos: -1 enqueue:NO];
...@@ -589,7 +596,13 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -589,7 +596,13 @@ static NSMutableArray *blackoutWindows = NULL;
for( i = 0; i < (int)[o_values count]; i++) for( i = 0; i < (int)[o_values count]; i++)
{ {
NSDictionary *o_dic; NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"]; char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
if( !psz_uri )
continue;
o_dic = [NSDictionary dictionaryWithObject:[NSString stringWithCString:psz_uri encoding:NSUTF8StringEncoding] forKey:@"ITEM_URL"];
free( psz_uri );
o_array = [o_array arrayByAddingObject: o_dic]; o_array = [o_array arrayByAddingObject: o_dic];
} }
if( b_autoplay ) if( b_autoplay )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment