Skip to content

Commit

Permalink
Better condition to skip merge of GIF and MP4 animations.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Aug 3, 2021
1 parent 13d5854 commit f8ab675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion td/telegram/AnimationsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit f8ab675

Please sign in to comment.