From 3f6d6fe7a0bf21bf5462ca2934bec9284b6d3fb2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 17 Oct 2021 15:01:55 -0400 Subject: [PATCH] Improve debug logging of packetqueue cleaning --- src/zm_packetqueue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zm_packetqueue.cpp b/src/zm_packetqueue.cpp index 3cf77b866..93edd6da8 100644 --- a/src/zm_packetqueue.cpp +++ b/src/zm_packetqueue.cpp @@ -260,6 +260,7 @@ void PacketQueue::clearPackets(const std::shared_ptr &add_packet) { zm_packet = *it; lp = new ZMLockedPacket(zm_packet); if (!lp->trylock()) { + Debug(3, "Failed locking packet %d", zm_packet->index); delete lp; break; } @@ -280,7 +281,7 @@ void PacketQueue::clearPackets(const std::shared_ptr &add_packet) { next_front = it; } ++video_packets_to_delete; - Debug(4, "Counted %d video packets. Which would leave %d in packetqueue tail count is %d", + Debug(3, "Counted %d video packets. Which would leave %d in packetqueue tail count is %d", video_packets_to_delete, packet_counts[video_stream_id]-video_packets_to_delete, tail_count); if (packet_counts[video_stream_id] - video_packets_to_delete <= pre_event_video_packet_count + tail_count) { break; @@ -289,7 +290,7 @@ void PacketQueue::clearPackets(const std::shared_ptr &add_packet) { ++it; } // end while } // end if first packet not locked - Debug(1, "Resulting pointing at latest packet? %d, next front points to begin? %d", + Debug(1, "Resulting it pointing at latest packet? %d, next front points to begin? %d", ( *it == add_packet ), ( next_front == pktQueue.begin() ) );