summaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-08-27 15:58:29 +0000
committerjstebbins <[email protected]>2014-08-27 15:58:29 +0000
commitcd1b955b6d297fb4003b0bc02d39586a689ffaf7 (patch)
treeb5d6ec7356eeaf00f8a304ea1a73347b252f70e6 /test/test.c
parent15417070c594a330923a62f0ab2054c39d3115f4 (diff)
CLI: fix dimensions problem when both width and height are specified
The GUI will precompute both width and height and specify both on the command line. But then the CLI recomputes width based on height which can result in the width being changed. So, in non-anamorphic mode, disable keep_aspect so that width and heigh are both kept. And in other anamorphic modes, use custom ana when computing dimensions so that both width and height are kept (i.e. recompute par). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6369 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c
index 44d9dd349..28dce55fd 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1730,6 +1730,17 @@ static int HandleEvents( hb_handle_t * h )
keep_display_aspect |= anamorphic_mode != HB_ANAMORPHIC_CUSTOM;
uiGeo.mode = job->anamorphic.mode = anamorphic_mode;
+ if (width != 0 && height != 0)
+ {
+ if (anamorphic_mode == HB_ANAMORPHIC_NONE)
+ {
+ keep_display_aspect = 0;
+ }
+ else
+ {
+ uiGeo.mode = HB_ANAMORPHIC_CUSTOM;
+ }
+ }
job->anamorphic.keep_display_aspect = keep_display_aspect;
uiGeo.keep = !!keep_display_aspect * HB_KEEP_DISPLAY_ASPECT;
uiGeo.itu_par = job->anamorphic.itu_par = itu_par;