From 2c2f60d4e0e9a0ffa2cc8482683b01afd167c436 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 14 Sep 2012 07:55:31 -0700 Subject: [PATCH] Fix completely incorrect behavior when AR changing is enabled in the resolution resampler --- aegisub/src/dialog_resample.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aegisub/src/dialog_resample.cpp b/aegisub/src/dialog_resample.cpp index 00b1abad4..d4539e15d 100644 --- a/aegisub/src/dialog_resample.cpp +++ b/aegisub/src/dialog_resample.cpp @@ -245,9 +245,12 @@ void ResampleResolution(AssFile *ass, ResampleSettings const& settings) { settings.margin, double(settings.script_x) / double(src_x), double(settings.script_y) / double(src_y), - settings.change_ar ? state.rx / state.ry : 1.0 + 1.0 }; + if (settings.change_ar) + state.ar = state.rx / state.ry; + for_each(ass->Line.begin(), ass->Line.end(), bind(resample_line, &state, std::tr1::placeholders::_1)); ass->SetScriptInfo("PlayResX", wxString::Format("%d", settings.script_x));