From 0bbc6321d5fd92c19fb960d10e0debaa692e974d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 29 Apr 2022 18:38:23 -0400 Subject: [PATCH] ifdef out the packet re-ordering code. It may be bogus. --- src/zm_packetqueue.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/zm_packetqueue.cpp b/src/zm_packetqueue.cpp index f03395bc1..888f1b5d7 100644 --- a/src/zm_packetqueue.cpp +++ b/src/zm_packetqueue.cpp @@ -87,7 +87,7 @@ bool PacketQueue::queuePacket(std::shared_ptr add_packet) { { std::unique_lock lck(mutex); if (deleting or zm_terminate) return false; - +#if 0 bool have_out_of_order = false; auto rit = pktQueue.rbegin(); if (add_packet->packet.dts != AV_NOPTS_VALUE) { @@ -110,6 +110,7 @@ bool PacketQueue::queuePacket(std::shared_ptr add_packet) { } // end while } if (have_out_of_order) { + //auto it = rit.base(); it++; // insert inserts BEFORE the it, so we need to pktQueue.insert(rit.base(), add_packet); if (rit == pktQueue.rend()) { Warning("Unable to re-order packet"); @@ -118,6 +119,7 @@ bool PacketQueue::queuePacket(std::shared_ptr add_packet) { dumpQueue(); } } else { +#endif pktQueue.push_back(add_packet); for ( auto iterators_it = iterators.begin(); @@ -129,7 +131,10 @@ bool PacketQueue::queuePacket(std::shared_ptr add_packet) { --(*iterator_it); } } // end foreach iterator +#if 0 } +#endif + packet_counts[add_packet->packet.stream_index] += 1; Debug(2, "packet counts for %d is %d",