Remove forgotten sws_scale check

It should been removed in 7d29f9ce17, but was forgotten
This commit is contained in:
Ilya Fedin 2020-10-29 18:34:31 +04:00 committed by John Preston
parent 9818724382
commit 6e42d54632
1 changed files with 1 additions and 5 deletions

View File

@ -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);