]> granicus.if.org Git - handbrake/commitdiff
LinGui: custom-ana reduce PAR when it's modified indirectly
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 20 Oct 2015 15:07:00 +0000 (08:07 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 26 Oct 2015 15:32:38 +0000 (08:32 -0700)
If PAR is indirectly changed through the user changing storage or
display width and height, reduce PAR to minimum num and den.

gtk/src/hb-backend.c

index beb9797e54c29bf7b8d02045499442a1cabc11f7..0c22c430dae3c154a4deb8a76617783b2d61baca 100644 (file)
@@ -3746,6 +3746,8 @@ ghb_set_scale_settings(GhbValue *settings, gint mode)
                 uiGeo.geometry.par.num =
                         ghb_dict_get_int(settings, "PictureDisplayWidth");
                 uiGeo.geometry.par.den = width;
+                hb_reduce(&uiGeo.geometry.par.num, &uiGeo.geometry.par.den,
+                           uiGeo.geometry.par.num,  uiGeo.geometry.par.den);
             }
         }
         else