when counting keyframe interval in clearPackets start at 0. Reset max_keyframe_interval when clearing packetqueue. This prevents errors in log when using ondemand capture
parent
8496ce637a
commit
dadd9e24df
|
@ -295,7 +295,7 @@ void PacketQueue::clearPackets(const std::shared_ptr<ZMPacket> &add_packet) {
|
|||
return;
|
||||
}
|
||||
|
||||
int keyframe_interval_count = 1;
|
||||
int keyframe_interval_count = 0;
|
||||
int video_packets_to_delete = 0; // This is a count of how many packets we will delete so we know when to stop looking
|
||||
|
||||
ZMLockedPacket *lp = new ZMLockedPacket(zm_packet);
|
||||
|
@ -428,6 +428,7 @@ void PacketQueue::clear() {
|
|||
delete[] packet_counts;
|
||||
packet_counts = nullptr;
|
||||
max_stream_id = -1;
|
||||
max_keyframe_interval_ = 0;
|
||||
|
||||
Debug(1, "Packetqueue is clear, notifying");
|
||||
condition.notify_all();
|
||||
|
|
Loading…
Reference in New Issue