mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 12:18:37 -05:00
Make sure n_read is > 0 ..
This commit is contained in:
parent
7f2f3d95d2
commit
d551d5f2c4
@ -276,6 +276,7 @@ void SDRThread::run() {
|
|||||||
|
|
||||||
// std::cout << n_read << ", " << timeNs << std::endl;
|
// std::cout << n_read << ", " << timeNs << std::endl;
|
||||||
|
|
||||||
|
if (n_read > 0) {
|
||||||
SDRThreadIQData *dataOut = buffers.getBuffer();
|
SDRThreadIQData *dataOut = buffers.getBuffer();
|
||||||
|
|
||||||
dataOut->setRefCount(1);
|
dataOut->setRefCount(1);
|
||||||
@ -290,7 +291,7 @@ void SDRThread::run() {
|
|||||||
} else {
|
} else {
|
||||||
dataOut->setRefCount(0);
|
dataOut->setRefCount(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
device->deactivateStream(stream);
|
device->deactivateStream(stream);
|
||||||
device->closeStream(stream);
|
device->closeStream(stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user