mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Added some format checks
This commit is contained in:
parent
529dfcd10a
commit
1aa9c3d871
@ -20,6 +20,17 @@
|
||||
|
||||
_frameCount = (int32_t)_animation->totalFrame();
|
||||
_frameRate = (int32_t)_animation->frameRate();
|
||||
|
||||
size_t width = 0;
|
||||
size_t height = 0;
|
||||
_animation->size(width, height);
|
||||
|
||||
if (width != height || (width != 100 && width != 512)) {
|
||||
return nil;
|
||||
}
|
||||
if ((_frameRate > 30 && _frameRate != 60) || _animation->duration() > 4.5) {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user