projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d94ea4
)
Use round in frameAtPos
author
Anton Sergeev
<antonsergeev88@gmail.com>
Sat, 25 Apr 2020 11:15:37 +0000
(14:15 +0300)
committer
Jongmin Lee
<jm105.lee@samsung.com>
Mon, 13 Jul 2020 03:33:20 +0000
(12:33 +0900)
Without this fix frameAtPos doesn't return last frame
for position (1 - eps)
src/lottie/lottiemodel.h
patch
|
blob
|
history
diff --git
a/src/lottie/lottiemodel.h
b/src/lottie/lottiemodel.h
index fe94bca2d11963ca6353511978c8749c3e47d53d..c61c920d53009974438ee031ace5ac5c2a44c5d0 100644
(file)
--- a/
src/lottie/lottiemodel.h
+++ b/
src/lottie/lottiemodel.h
@@
-663,7
+663,7
@@
public:
size_t frameAtPos(double pos) const {
if (pos < 0) pos = 0;
if (pos > 1) pos = 1;
- return size_t(
pos * frameDuration(
));
+ return size_t(
round(pos * frameDuration()
));
}
long frameAtTime(double timeInSec) const {
return long(frameAtPos(timeInSec / duration()));