summaryrefslogtreecommitdiffstats
path: root/test/test.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-12-17 16:36:22 +0000
committerjstebbins <[email protected]>2010-12-17 16:36:22 +0000
commit78daf7e4c8d295caad815ec2ec09763b5779dfff (patch)
treeaf48de98c5bce264a0ffcc202b65668179ad5426 /test/test.c
parent3bc190cb636fc3d5e9bff79b0b0be534a5d1d2d3 (diff)
cli: allow setting modulus with ana-none
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3711 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test/test.c')
-rw-r--r--test/test.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c
index 330054063..e8d9d183b 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1285,6 +1285,11 @@ static int HandleEvents( hb_handle_t * h )
{
case 0: // Non-anamorphic
+ if (modulus)
+ {
+ job->modulus = modulus;
+ }
+
if( width && height )
{
job->width = width;
@@ -1293,15 +1298,27 @@ static int HandleEvents( hb_handle_t * h )
else if( width )
{
job->width = width;
+ // do not exceed source dimensions by default
+ if( !maxHeight )
+ job->maxHeight = title->height;
hb_fix_aspect( job, HB_KEEP_WIDTH );
}
else if( height )
{
job->height = height;
+ // do not exceed source dimensions by default
+ if( !maxWidth )
+ job->maxWidth = title->width;
hb_fix_aspect( job, HB_KEEP_HEIGHT );
}
else if( !width && !height )
{
+ /* Default to cropped width when one isn't specified
+ * avoids rounding to mod 16 regardless of modulus */
+ job->width = title->width - job->crop[2] - job->crop[3];
+ // do not exceed source dimensions by default
+ if( !maxHeight )
+ job->maxHeight = title->height;
hb_fix_aspect( job, HB_KEEP_WIDTH );
}