From f8ab675ad14080b1609b5904c366052c814d1788 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 3 Aug 2021 03:13:56 +0300 Subject: [PATCH] Better condition to skip merge of GIF and MP4 animations. --- td/telegram/AnimationsManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index a75b554c9b1d..f00230b44804 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -312,7 +312,7 @@ bool AnimationsManager::merge_animations(FileId new_id, FileId old_id, bool can_ if (old_->thumbnail != new_->thumbnail) { // LOG_STATUS(td_->file_manager_->merge(new_->thumbnail.file_id, old_->thumbnail.file_id)); } - if (old_->mime_type == "image/gif" && new_->mime_type == "video/mp4") { + if (new_->file_name.size() == old_->file_name.size() + 4 && new_->file_name == old_->file_name + ".mp4") { need_merge = false; } }