Fix \fscx/\fscy animation.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 19 Feb 2007 18:31:05 +0000 (18:31 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 19 Feb 2007 18:31:05 +0000 (18:31 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@22278 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c

index ac0078e..18b64d7 100644 (file)
@@ -702,13 +702,13 @@ static char* parse_tag(char* p, double pwr) {
                if (tp == 'x') {
                        if (mystrtod(&p, &val)) {
                                val /= 100;
-                               render_context.scale_x = (val - 1.) * pwr + 1.;
+                               render_context.scale_x = render_context.scale_x * ( 1 - pwr) + val * pwr;
                        } else
                                render_context.scale_x = render_context.style->ScaleX;
                } else if (tp == 'y') {
                        if (mystrtod(&p, &val)) {
                                val /= 100;
-                               render_context.scale_y = (val - 1.) * pwr + 1.;
+                               render_context.scale_y = render_context.scale_y * ( 1 - pwr) + val * pwr;
                        } else
                                render_context.scale_y = render_context.style->ScaleY;
                }