summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-12-22 07:30:12 +0000
committerritsuka <[email protected]>2014-12-22 07:30:12 +0000
commit546f57a1402492f2aedeab1ca6cf9f3d3201795f (patch)
treef34dcfe06110e8411db490c807385983a2d87457 /macosx/HBJob.m
parentf258fb8da28967d8f2e2ddaf814233058197044f (diff)
MacGui: fixed a number of memory leaks. Do not set some deprecated hb_job fields.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6637 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBJob.m')
-rw-r--r--macosx/HBJob.m37
1 files changed, 22 insertions, 15 deletions
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index 946f24997..744952401 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -50,6 +50,22 @@
withObject:preset.content];
}
+- (void)dealloc
+{
+ [_audioTracks release];
+ [_subtitlesTracks release];
+
+ [_video release];
+ [_picture release];
+ [_filters release];
+
+ [_audioDefaults release];
+ [_subtitlesDefaults release];
+ [_fileURL release];
+
+ [super dealloc];
+}
+
/**
* Prepares a hb_job_t
*/
@@ -195,21 +211,9 @@
}
// Picture Size Settings
- job->width = self.picture.width;
- job->height = self.picture.height;
-
- job->anamorphic.keep_display_aspect = self.picture.keepDisplayAspect;
- job->anamorphic.mode = self.picture.anamorphicMode;
- job->modulus = self.picture.modulus;
job->par.num = self.picture.parWidth;
job->par.den = self.picture.parHeight;
- // Here we use the crop values saved at the time the preset was saved
- job->crop[0] = self.picture.cropTop;
- job->crop[1] = self.picture.cropBottom;
- job->crop[2] = self.picture.cropLeft;
- job->crop[3] = self.picture.cropRight;
-
// Video settings
// Framerate
int fps_mode, fps_num, fps_den;
@@ -268,6 +272,9 @@
for (NSDictionary *subtitleDict in self.subtitlesTracks)
{
+ if (i == self.subtitlesTracks.count - 1)
+ continue;
+
int subtitle = [subtitleDict[keySubTrackIndex] intValue];
int force = [subtitleDict[keySubTrackForced] intValue];
int burned = [subtitleDict[keySubTrackBurned] intValue];
@@ -551,9 +558,9 @@
// Add Crop/Scale filter
filter = hb_filter_init(HB_FILTER_CROP_SCALE);
hb_add_filter( job, filter, [NSString stringWithFormat:@"%d:%d:%d:%d:%d:%d",
- job->width, job->height,
- job->crop[0], job->crop[1],
- job->crop[2], job->crop[3]].UTF8String);
+ self.picture.width, self.picture.height,
+ self.picture.cropTop, self.picture.cropBottom,
+ self.picture.cropLeft, self.picture.cropRight].UTF8String);
// Add framerate shaping filter
filter = hb_filter_init(HB_FILTER_VFR);