From: jstebbins Date: Fri, 23 Oct 2009 00:30:02 +0000 (+0000) Subject: fix a couple picture scale issues X-Git-Tag: 0.9.4~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4784d4c2d72a0aa7366d48d3974339c12b0f65af;p=handbrake fix a couple picture scale issues adjusting the storage height sometimes got wedged due to incorrect rounding causing feedback loop. height change leads to width change, but width rounded too small width change leads to height change that goes back to original height presets that had width/height saved (e.g. iPod) were blocking user from manually selecting a higher resolution. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2894 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 396eae561..6dc26275c 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -3114,7 +3114,12 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) if (busy) return; busy = TRUE; - + if (!ud->dont_clear_presets && (keep_width || keep_height)) + { + ghb_settings_set_int(ud->settings, "PictureWidth", 0); + ghb_settings_set_int(ud->settings, "PictureHeight", 0); + } + // First configure widgets mod = ghb_settings_combo_int(ud->settings, "PictureModulus"); pic_par = ghb_settings_combo_int(ud->settings, "PicturePAR"); @@ -3250,7 +3255,7 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) job->anamorphic.dar_height = 0; if (keep_height && pic_par == 2) - width = ((double)height * crop_width / crop_height) + 0.5; + width = ((double)height * crop_width / crop_height) + mod / 2; job->width = width; job->height = height; job->maxWidth = max_width;