mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Check mapping errors in getLastVPXImage
This commit is contained in:
parent
34e25ec474
commit
677e1ce688
|
@ -217,7 +217,11 @@ vpx_image Camera::getLastVPXImage()
|
||||||
vpx_image img;
|
vpx_image img;
|
||||||
if (!lastFrame.isValid())
|
if (!lastFrame.isValid())
|
||||||
return img;
|
return img;
|
||||||
lastFrame.map(QAbstractVideoBuffer::ReadOnly);
|
if (!lastFrame.map(QAbstractVideoBuffer::ReadOnly))
|
||||||
|
{
|
||||||
|
qWarning() << "Camera::getLastVPXImage: Error maping last frame";
|
||||||
|
return img;
|
||||||
|
}
|
||||||
int w = lastFrame.width(), h = lastFrame.height();
|
int w = lastFrame.width(), h = lastFrame.height();
|
||||||
int bpl = lastFrame.bytesPerLine();
|
int bpl = lastFrame.bytesPerLine();
|
||||||
vpx_img_alloc(&img, VPX_IMG_FMT_I420, w, h, 1); // I420 == YUV420P, same as YV12 with U and V switched
|
vpx_img_alloc(&img, VPX_IMG_FMT_I420, w, h, 1); // I420 == YUV420P, same as YV12 with U and V switched
|
||||||
|
|
Loading…
Reference in New Issue
Block a user