]> granicus.if.org Git - handbrake/commitdiff
cli: fix --height
authorjstebbins <jstebbins.hb@gmail.com>
Thu, 14 May 2015 15:14:39 +0000 (15:14 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Thu, 14 May 2015 15:14:39 +0000 (15:14 +0000)
Didn't set the proper flag to make hb_set_anamorphic_size prefer keeping
the height over the width.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7178 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/preset.c

index c49073cf4982940dd0d17702f9ef8d3d46200073..97a647214a9e1bbe3f4a2f49c9de1d6423345826 100644 (file)
@@ -968,13 +968,23 @@ hb_dict_t* hb_preset_job_init(hb_handle_t *h, int title_index, hb_dict_t *preset
     int width = hb_value_get_int(hb_dict_get(preset, "PictureForceWidth"));
     int height = hb_value_get_int(hb_dict_get(preset, "PictureForceHeight"));
     if (width > 0)
+    {
         geo.geometry.width = width;
+        geo.keep |= HB_KEEP_WIDTH;
+    }
     else
+    {
         geo.geometry.width -= geo.crop[2] + geo.crop[3];
+    }
     if (height > 0)
+    {
         geo.geometry.height = height;
+        geo.keep |= HB_KEEP_HEIGHT;
+    }
     else
+    {
         geo.geometry.height -= geo.crop[0] + geo.crop[1];
+    }
     if (geo.mode == HB_ANAMORPHIC_CUSTOM && !keep_aspect)
     {
         int dar_width;