Prefer video dimensions over image size attribute.
This commit is contained in:
parent
3f856ccb46
commit
797aaecf2a
@ -110,8 +110,12 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
|
||||
int32 video_duration = 0;
|
||||
if (video != nullptr) {
|
||||
video_duration = video->duration_;
|
||||
if (dimensions.width == 0) {
|
||||
dimensions = get_dimensions(video->w_, video->h_, "documentAttributeVideo");
|
||||
auto video_dimensions = get_dimensions(video->w_, video->h_, "documentAttributeVideo");
|
||||
if (dimensions.width == 0 || (video_dimensions.width != 0 && video_dimensions != dimensions)) {
|
||||
if (dimensions.width != 0) {
|
||||
LOG(ERROR) << "Receive ambiguous video dimensions " << dimensions << " and " << video_dimensions;
|
||||
}
|
||||
dimensions = video_dimensions;
|
||||
}
|
||||
|
||||
if (animated != nullptr) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user