mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-14 11:56:25 +00:00
avoid processing empty video frame buffers
This commit is contained in:
parent
15ddcaf181
commit
a747ab7af7
@ -191,6 +191,12 @@ static QImage* rgbDataToGrayscale(const uchar* data, const CaptureRect& captureR
|
||||
|
||||
void QZXingFilterRunnable::processVideoFrameProbed(SimpleVideoFrame & videoFrame, const QRect& _captureRect)
|
||||
{
|
||||
if (videoFrame.data.length() < 1) {
|
||||
qDebug() << "QZXingFilterRunnable: Buffer is empty";
|
||||
filter->decoding = false;
|
||||
return;
|
||||
}
|
||||
|
||||
static unsigned int i = 0; i++;
|
||||
// qDebug() << "Future: Going to process frame: " << i;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user