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 @@
#import "embeddedwindow.h"
#import "fspanel.h"
#import "playlist.h"
#import <vlc_url.h>
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
......@@ -904,7 +905,13 @@
for( i = 0; i < (int)[o_values count]; i++)
{
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];
}
if( b_autoplay )
......
......@@ -29,6 +29,7 @@
#import "misc.h"
#import "playlist.h"
#import "controls.h"
#import <vlc_url.h>
/*****************************************************************************
* NSImage (VLCAdditions)
......@@ -510,7 +511,13 @@ static NSMutableArray *blackoutWindows = NULL;
for( i = 0; i < (int)[o_values count]; i++)
{
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];
}
[(VLCPlaylist *)[[VLCMain sharedInstance] playlist] appendArray: o_array atPos: -1 enqueue:NO];
......@@ -589,7 +596,13 @@ static NSMutableArray *blackoutWindows = NULL;
for( i = 0; i < (int)[o_values count]; i++)
{
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];
}
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