Browse code

core: reverted commit ea1dc3598f053f725983ad9b8008a43b8a30fcf4 in 1.5 branch - "hot fix for possible infinite loop in PacketMem::newPacket()" not needed in 1.5 and makes AmRtpStream.cpp to not compile

Juha Heinanen authored on 14/03/2013 01:35:11
Showing 1 changed files
... ...
@@ -1021,15 +1021,6 @@ inline AmRtpPacket* PacketMem::newPacket() {
1021 1021
 inline void PacketMem::freePacket(AmRtpPacket* p) {
1022 1022
   if (!p)  return;
1023 1023
 
1024
-  int idx = p-packets;
1025
-  assert(idx >= 0);
1026
-  assert(idx < MAX_PACKETS);
1027
-
1028
-  if(!used[idx]) {
1029
-    ERROR("freePacket() double free: n_used = %d, idx = %d",n_used,idx);
1030
-    return;
1031
-  }
1032
-
1033 1024
   used[p-packets] = false;
1034 1025
 }
1035 1026