]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix scaling problem with preview window
authorjstebbins <jstebbins.hb@gmail.com>
Wed, 22 Jun 2011 14:51:32 +0000 (14:51 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Wed, 22 Jun 2011 14:51:32 +0000 (14:51 +0000)
... when the screen is smaller than the preview.  If the width fit but the
height didn't, it computed incorrect size and displayed with wrong aspect.

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

gtk/src/hb-backend.c

index a55897ab8a947b83b32ba64164309f170bbb0ef8..e643dea44d568a0e1009b99dc87e11cbd12fc1b2 100644 (file)
@@ -5319,7 +5319,7 @@ ghb_get_preview_image(
                if (dstHeight > s_h * factor / 100)
                {
                        dstHeight = s_h * factor / 100;
-                       dstWidth = dstWidth * dstHeight / orig_h;
+                       dstWidth = orig_w * dstHeight / orig_h;
                }
                xscale *= (gdouble)dstWidth / orig_w;
                yscale *= (gdouble)dstHeight / orig_h;