fix animation replace error
authorstart1a <start3a@gmail.com>
Mon, 28 Sep 2020 09:47:45 +0000 (18:47 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 11 Oct 2020 21:09:32 +0000 (06:09 +0900)
example/rlottiePlayer/Source.cpp

index cf6d8512efd9fb0db52a90d25ff9e2a017fd1647..99ea876dd71f7abb31450202e37a1f8db8cd05d9 100644 (file)
@@ -27,11 +27,11 @@ void setAnimation(char* path, size_t* w, size_t* h)
 
 uint32_t* renderRLottieAnimation(uint32_t frameNum)
 {
-       static Surface surface = Surface(buffer, width, height, bytesPerLine);
+       Surface surface = Surface(buffer, width, height, bytesPerLine);
        anim->renderSync(frameNum, surface);
        // background color
        for (int i = 0; i < height; i++)
-               for (int j = 0; j < width; ++j)
+        for (int j = 0; j < width; ++j)
                {
                        uint32_t* v = buffer + i * width + j;
                        if (*v == 0) *v = curColor;