Telegram on iOS crashes when browsing stickers or gifs longer than 30 second
If you open the sticker/gif panel when entering a message, flip, twist, rotate, no matter how, but view them, 15-20 seconds - the application crashes. Steps to reproduce Entering a message; Click on the…
The stickers with emoji 1️⃣ have non-uniform framerate. 2️⃣ have uniform framerate. I noticed that in the video metadata it seems the framerate of 1️⃣ is set to 25fps. Telegram iOS could be using only the framerate as play speed but Desktop/Android is following the frame durations.
https://github.com/TelegramMessenger/Telegram-iOS/blob/release-8.5.1/submodules/AnimatedStickerNode/Sources/AnimatedStickerNode.swift#L417
I'm not familiar with Swift, but I guess what I saw there should be the problem. The WebM video is played using a constant framerate.
If you check this link: https://www.webmproject.org/docs/container/ , framerate is now deprecated and informational only, which means framerate shouldn't be used as the play speed of WebM video.
My workaround about the issue for now is set the framerate to an average - but this will somehow change the timings of the animations. Hope this could be improved soon.