Use minimal timer access and diagnose failed video image transforms
This commit is contained in:
1 parent
9d45488369
commit
5e38e5b71d
2 files changed
+6
-2
No files matched your search
@@ -188,7 +188,10 @@ int CallVideoDecoder::receive(call_video_frame& f, QImage& image) {
|
||||
uint8_t* planes[4] = {output.bits(), nullptr, nullptr, nullptr}; int strides[4] = {(int)output.bytesPerLine(), 0, 0, 0};
|
||||
if (sws_scale(m->scale, pixels->data, pixels->linesize, 0, pixels->height, planes, strides) != pixels->height)
|
||||
result = AVERROR_INVALIDDATA;
|
||||
else image = f.format.rotation ? output.transformed(QTransform().rotate(f.format.rotation)) : output;
|
||||
else {
|
||||
image = f.format.rotation ? output.transformed(QTransform().rotate(f.format.rotation)) : output;
|
||||
if (image.isNull()) result = AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
}
|
||||
av_frame_free(&copied); av_frame_free(&decoded);
|
||||
|
||||
Reference in new issue
Block a user