From 6e42d546328050d10a3efbdf53553579228be3ea Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 29 Oct 2020 18:34:31 +0400 Subject: [PATCH] Remove forgotten sws_scale check It should been removed in 7d29f9ce17c837a0ae2944f5b2c75dc16c9f61f6, but was forgotten --- Telegram/SourceFiles/media/clip/media_clip_ffmpeg.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/media/clip/media_clip_ffmpeg.cpp b/Telegram/SourceFiles/media/clip/media_clip_ffmpeg.cpp index 263ff877e..2053da32d 100644 --- a/Telegram/SourceFiles/media/clip/media_clip_ffmpeg.cpp +++ b/Telegram/SourceFiles/media/clip/media_clip_ffmpeg.cpp @@ -258,11 +258,7 @@ bool FFMpegReaderImplementation::renderFrame(QImage &to, bool &hasAlpha, const Q // AV_NUM_DATA_POINTERS defined in AVFrame struct uint8_t *toData[AV_NUM_DATA_POINTERS] = { to.bits(), nullptr }; int toLinesize[AV_NUM_DATA_POINTERS] = { to.bytesPerLine(), 0 }; - int res; - if ((res = sws_scale(_swsContext, _frame->data, _frame->linesize, 0, _frame->height, toData, toLinesize)) != _swsSize.height()) { - LOG(("Gif Error: Unable to sws_scale to good size %1, height %2, should be %3").arg(logData()).arg(res).arg(_swsSize.height())); - return false; - } + sws_scale(_swsContext, _frame->data, _frame->linesize, 0, _frame->height, toData, toLinesize); } if (hasAlpha) { FFmpeg::PremultiplyInplace(to);