diff options
author | jstebbins <[email protected]> | 2009-10-23 00:30:02 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-10-23 00:30:02 +0000 |
commit | 4784d4c2d72a0aa7366d48d3974339c12b0f65af (patch) | |
tree | d9a0067064ce75e4df4a30eb91e19ceb6aca3c7c /gtk/src/hb-backend.c | |
parent | 7ca9efc397bac13419a6ef30ee33826f987a1a5a (diff) |
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
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; |