put back deleting the raw image when not saving jpegs. We only need it for the snapshot and that should be the alarmed image anyways.

This commit is contained in:
Isaac Connor 2021-03-16 12:08:11 -04:00
parent 2b0e3d0d2c
commit 76267bc57f
1 changed files with 9 additions and 0 deletions

View File

@ -2286,6 +2286,15 @@ bool Monitor::Analyse() {
if (event) event->AddPacket(snap); if (event) event->AddPacket(snap);
// In the case where people have pre-alarm frames, the web ui will generate the frame images
// from the mp4. So no one will notice anyways.
if ((videowriter == PASSTHROUGH) and !savejpegs) {
Debug(1, "Deleting image data for %d", snap->image_index);
// Don't need raw images anymore
delete snap->image;
snap->image = nullptr;
}
// popPacket will have placed a second lock on snap, so release it here. // popPacket will have placed a second lock on snap, so release it here.
delete packet_lock; delete packet_lock;