Skip to content

Commit 74f9dee

Browse files
Free starting_packet_lock earlier so theoretically event can grab it sooner
1 parent c42608f commit 74f9dee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zm_monitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3158,10 +3158,10 @@ Event * Monitor::openEvent(
31583158
return nullptr;
31593159
}
31603160
std::shared_ptr<ZMPacket> starting_packet = starting_packet_lock->packet_;
3161+
delete starting_packet_lock;
31613162
ZM_DUMP_PACKET(starting_packet->packet, "First packet from start");
31623163
event = new Event(this, start_it, starting_packet->timestamp, cause, noteSetMap);
31633164
SetVideoWriterStartTime(starting_packet->timestamp);
3164-
delete starting_packet_lock;
31653165
} else {
31663166
ZM_DUMP_PACKET(snap->packet, "First packet from alarm");
31673167
event = new Event(this, start_it, snap->timestamp, cause, noteSetMap);

0 commit comments

Comments
 (0)