Bugfix: Write data to tsbuffer only if DvrOpen has been called. This avoids Buffer Overflow when not recording or viewing live.
This commit is contained in:
parent
6d68ef3e49
commit
c966d28d13
|
@ -408,7 +408,7 @@ void cSatipDevice::WriteData(uchar *bufferP, int lengthP)
|
||||||
{
|
{
|
||||||
//debug("cSatipDevice::%s(%u)", __FUNCTION__, deviceIndexM);
|
//debug("cSatipDevice::%s(%u)", __FUNCTION__, deviceIndexM);
|
||||||
// Fill up TS buffer
|
// Fill up TS buffer
|
||||||
if (tsBufferM) {
|
if (isOpenDvrM && tsBufferM) {
|
||||||
int len = tsBufferM->Put(bufferP, lengthP);
|
int len = tsBufferM->Put(bufferP, lengthP);
|
||||||
if (len != lengthP)
|
if (len != lengthP)
|
||||||
tsBufferM->ReportOverflow(lengthP - len);
|
tsBufferM->ReportOverflow(lengthP - len);
|
||||||
|
|
Loading…
Reference in New Issue