summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-11-02 15:13:46 +0000
committerritsuka <[email protected]>2014-11-02 15:13:46 +0000
commit18ee2d5b932919e60396060ea063053ac8fc711a (patch)
tree115b67dfbe62a097d274c458113ad3f763ba37ab
parent2857c1fd3d6762d787a90474440b1def74223232 (diff)
MacGui: removed two useless array creation and made a copy of the trackSelectionLanguages ivar before assigning it to the preset dict.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6497 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.m4
-rw-r--r--macosx/HBAudioDefaults.m2
-rw-r--r--macosx/HBSubtitlesDefaults.m3
3 files changed, 5 insertions, 4 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index 82f6f7402..728e43781 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -2545,7 +2545,7 @@ fWorkingCount = 0;
/* Audio */
NSMutableArray *audioArray = [[NSMutableArray alloc] initWithArray:[fAudioController audioTracks] copyItems:YES];
- [queueFileJob setObject:[NSArray arrayWithArray: audioArray] forKey:@"AudioList"];
+ [queueFileJob setObject:audioArray forKey:@"AudioList"];
[audioArray release];
/* Subtitles Defaults */
@@ -2555,7 +2555,7 @@ fWorkingCount = 0;
/* Subtitles */
NSMutableArray *subtitlesArray = [[NSMutableArray alloc] initWithArray:[fSubtitlesViewController subtitles] copyItems:YES];
- [queueFileJob setObject:[NSArray arrayWithArray: subtitlesArray] forKey:@"SubtitleList"];
+ [queueFileJob setObject:subtitlesArray forKey:@"SubtitleList"];
[subtitlesArray release];
/* Now we go ahead and set the "job->values in the plist for passing right to fQueueEncodeLibhb */
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m
index 3c9cff573..58b355573 100644
--- a/macosx/HBAudioDefaults.m
+++ b/macosx/HBAudioDefaults.m
@@ -179,7 +179,7 @@
{
preset[@"AudioTrackSelectionBehavior"] = @"none";
}
- preset[@"AudioLanguageList"] = self.trackSelectionLanguages;
+ preset[@"AudioLanguageList"] = [[self.trackSelectionLanguages copy] autorelease];
// Passthru settings
preset[@"AudioAllowAACPass"] = @(self.allowAACPassthru);
diff --git a/macosx/HBSubtitlesDefaults.m b/macosx/HBSubtitlesDefaults.m
index 71046c060..544123de1 100644
--- a/macosx/HBSubtitlesDefaults.m
+++ b/macosx/HBSubtitlesDefaults.m
@@ -52,7 +52,8 @@
{
preset[@"SubtitleTrackSelectionBehavior"] = @"none";
}
- preset[@"SubtitleLanguageList"] = self.trackSelectionLanguages;
+
+ preset[@"SubtitleLanguageList"] = [[self.trackSelectionLanguages copy] autorelease];
preset[@"SubtitleAddCC"] = @(self.addCC);
preset[@"SubtitleAddForeignAudioSearch"] = @(self.addForeignAudioSearch);
preset[@"SubtitleAddForeignAudioSubtitle"] = @(self.addForeignAudioSubtitle);