Monitor: Don't push packets into the packet queue when in Monitor mode
There is no consumer for the packets in this mode, so don't queue them up. This saves quite a bit of RAM for mode of operation.
This commit is contained in:
parent
c32fbed88a
commit
2f5dff7244
|
@ -2613,7 +2613,8 @@ int Monitor::Capture() {
|
|||
shared_data->last_write_time = packet->timestamp->tv_sec;
|
||||
image_count++;
|
||||
|
||||
if ( packetqueue.packet_count(video_stream_id) or packet->keyframe or event ) {
|
||||
if (GetFunction() != Function::MONITOR
|
||||
and (packetqueue.packet_count(video_stream_id) or packet->keyframe or event)) {
|
||||
Debug(2, "Have video packet for image index (%d), adding to queue", index);
|
||||
packetqueue.queuePacket(packet);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue