diff --git a/Telegram/SourceFiles/lottie/lottie_animation.cpp b/Telegram/SourceFiles/lottie/lottie_animation.cpp index b7c80fc095..29f53d9e5a 100644 --- a/Telegram/SourceFiles/lottie/lottie_animation.cpp +++ b/Telegram/SourceFiles/lottie/lottie_animation.cpp @@ -80,10 +80,12 @@ QImage Animation::frame(crl::time now) const { const auto position = now; const auto elapsed = int((_scene->frameRate() * position + 500) / 1000); - const auto frames = (_scene->endFrame() - _scene->startFrame()); + const auto from = _scene->startFrame(); + const auto till = _scene->endFrame(); + const auto frames = (till - from); const auto frame = _options.loop - ? (_scene->startFrame() + (elapsed % frames)) - : std::min(_scene->startFrame() + elapsed, _scene->endFrame()); + ? (from + (elapsed % frames)) + : std::min(from + elapsed, till); _scene->updateProperties(frame); diff --git a/Telegram/ThirdParty/qtlottie b/Telegram/ThirdParty/qtlottie index bfc7dc4606..9162dace08 160000 --- a/Telegram/ThirdParty/qtlottie +++ b/Telegram/ThirdParty/qtlottie @@ -1 +1 @@ -Subproject commit bfc7dc4606bbba1f5c42f4868e39b48e4b5764b5 +Subproject commit 9162dace0879b9190cefac0468c4dc4f92579488