summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-06-26 23:00:43 +0000
committerjstebbins <[email protected]>2010-06-26 23:00:43 +0000
commiteb5d02bcc686fa27dd9c132657feff1672ab0add (patch)
treecf25f677fe87a87cb056e92c77e72d0a4742f785 /macosx/Controller.m
parentc1d1825e1c8ecf71c70af93faa6431fbc6e4a059 (diff)
MacGui: apply maxHeight in non-anamorphic
in anamorphic mode, apply maxWidth&maxHeight and adjust dimensions with hb_set_anamorphic_size. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3413 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m24
1 files changed, 22 insertions, 2 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index 7dba8fe40..8d404ad0b 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -6986,14 +6986,34 @@ return YES;
job->keep_ratio = [[chosenPreset objectForKey:@"PictureKeepRatio"] intValue];
if (job->keep_ratio == 1)
{
+ int height = fTitle->height;
+
+ if ( job->height && job->height < fTitle->height )
+ height = job->height;
+
hb_fix_aspect( job, HB_KEEP_WIDTH );
- if( job->height > fTitle->height )
+ // Make sure the resulting height is less than
+ // the title height and less than the height
+ // requested in the preset.
+ if( job->height > height )
{
- job->height = fTitle->height;
+ job->height = height;
hb_fix_aspect( job, HB_KEEP_HEIGHT );
}
}
job->anamorphic.mode = [[chosenPreset objectForKey:@"PicturePAR"] intValue];
+ if ( job->anamorphic.mode > 0 )
+ {
+ int w, h, par_w, par_h;
+
+ job->anamorphic.par_width = fTitle->pixel_aspect_width;
+ job->anamorphic.par_height = fTitle->pixel_aspect_height;
+ job->maxWidth = job->width;
+ job->maxHeight = job->height;
+ hb_set_anamorphic_size( job, &w, &h, &par_w, &par_h );
+ job->width = w;
+ job->height = h;
+ }
}