mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-12 19:06:50 +00:00
Merge pull request #100 from fredldotme/master
avoid processing empty video frame buffers
This commit is contained in:
commit
0211eed2af
@ -191,6 +191,12 @@ static QImage* rgbDataToGrayscale(const uchar* data, const CaptureRect& captureR
|
|||||||
|
|
||||||
void QZXingFilterRunnable::processVideoFrameProbed(SimpleVideoFrame & videoFrame, const QRect& _captureRect)
|
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++;
|
static unsigned int i = 0; i++;
|
||||||
// qDebug() << "Future: Going to process frame: " << i;
|
// qDebug() << "Future: Going to process frame: " << i;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user