Fix video thumbnails for small videos

pull/1841/head
Nicolas Werner 2 months ago
parent a3219c71d7
commit 2ded62f77d
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 2
      src/timeline/InputBar.cpp

@ -1182,7 +1182,7 @@ MediaUpload::startUpload()
QBuffer buffer(&ba);
buffer.open(QIODevice::WriteOnly);
thumbnail_.save(&buffer, "PNG", 0);
if (ba.size() >= (data.size() - data.size() / 10)) {
if (type() == MediaType::Image && ba.size() >= (data.size() - data.size() / 10)) {
nhlog::ui()->info(
"Thumbnail is not a lot smaller than original image, not uploading it");
nhlog::ui()->debug(

Loading…
Cancel
Save