mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Seek done in video player in MediaView. Some memory leaks fixed.
Using pixmapFromImageInPlace() instead of QPixmap::fromImage().
This commit is contained in:
@@ -2643,7 +2643,7 @@ namespace Local {
|
||||
case StorageFileWebp: guessFormat = "WEBP"; break;
|
||||
default: guessFormat = QByteArray(); break;
|
||||
}
|
||||
pixmap = QPixmap::fromImage(App::readImage(data, &guessFormat, false), Qt::ColorOnly);
|
||||
pixmap = App::pixmapFromImageInPlace(App::readImage(data, &guessFormat, false));
|
||||
if (!pixmap.isNull()) {
|
||||
format = guessFormat;
|
||||
}
|
||||
@@ -2910,7 +2910,7 @@ namespace Local {
|
||||
struct Result {
|
||||
Result(StorageFileType type, const QByteArray &data) : image(type, data) {
|
||||
QByteArray guessFormat;
|
||||
pixmap = QPixmap::fromImage(App::readImage(data, &guessFormat, false), Qt::ColorOnly);
|
||||
pixmap = App::pixmapFromImageInPlace(App::readImage(data, &guessFormat, false));
|
||||
if (!pixmap.isNull()) {
|
||||
format = guessFormat;
|
||||
}
|
||||
|
Reference in New Issue
Block a user