elementary animation_view: correct max frame number. 13/205413/1 devel/tizen_4.0/lottie
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 3 May 2019 06:40:40 +0000 (15:40 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 3 May 2019 06:41:11 +0000 (15:41 +0900)
Change-Id: Iee8ed41f8d1e0c17bfff97765a5cdc2d7ca3a8e1
Signed-off-by: JunsuChoi <jsuya.choi@samsung.com>
src/lib/elm_animation_view.c

index 4a317b87151bd7d751c00cff8971f2860326e54b..a439c28f0085f48cce7de36cf6b11220ce2bffe0 100644 (file)
@@ -169,7 +169,7 @@ _transit_cb(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
    else pd->state = ELM_ANIMATION_VIEW_STATE_PLAY;
 
    pd->keyframe = progress;
-   evas_object_vg_animated_frame_set(pd->vg, (int) (pd->frame_cnt * progress));
+   evas_object_vg_animated_frame_set(pd->vg, (int) ((pd->frame_cnt - 1) * progress));
 
    if (pd->auto_repeat)
      {
@@ -493,7 +493,7 @@ _elm_animation_view_keyframe_set(Eo *obj EINA_UNUSED, Elm_Animation_View_Data *p
    pd->keyframe = keyframe;
 
    if (pd->frame_cnt > 0)
-     evas_object_vg_animated_frame_set(pd->vg, (int) (pd->frame_cnt * keyframe));
+     evas_object_vg_animated_frame_set(pd->vg, (int) ((pd->frame_cnt - 1) * keyframe));
 
    if (pd->transit)
      {