Commit af26945f authored by James Dumay's avatar James Dumay Committed by Felix Paul Kühne

use @autoreleasepool instead of NSAutoreleasePool

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent c91e6972
......@@ -866,21 +866,20 @@ NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
#if !TARGET_OS_IPHONE
- (void)fetchMetaInformationForArtWorkWithURL:(NSString *)anURL
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSImage * art = nil;
if (anURL) {
// Go ahead and load up the art work
NSURL * artUrl = [NSURL URLWithString:[anURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
// Don't attempt to fetch artwork from remote. Core will do that alone
if ([artUrl isFileURL])
art = [[[NSImage alloc] initWithContentsOfURL:artUrl] autorelease];
}
// If anything was found, lets save it to the meta data dictionary
[self performSelectorOnMainThread:@selector(setArtwork:) withObject:art waitUntilDone:NO];
@autoreleasepool {
NSImage * art = nil;
if (anURL) {
// Go ahead and load up the art work
NSURL * artUrl = [NSURL URLWithString:[anURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
// Don't attempt to fetch artwork from remote. Core will do that alone
if ([artUrl isFileURL])
art = [[NSImage alloc] initWithContentsOfURL:artUrl];
}
[pool release];
// If anything was found, lets save it to the meta data dictionary
[self performSelectorOnMainThread:@selector(setArtwork:) withObject:art waitUntilDone:NO];
}
}
- (void)setArtwork:(NSImage *)art
......
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