Fix memory leak in video_coding::PacketBuffer::InsertPacket.

BUG=webrtc:6788

Review-Url: https://codereview.webrtc.org/2535203002
Cr-Commit-Position: refs/heads/master@{#15314}
This commit is contained in:
philipel
2016-11-30 01:32:05 -08:00
committed by Commit bot
parent be74270ebe
commit 759e0b7241
5 changed files with 77 additions and 44 deletions

View File

@ -48,9 +48,10 @@ class PacketBuffer {
virtual ~PacketBuffer();
// Returns true if |packet| is inserted into the packet buffer,
// false otherwise. Made virtual for testing.
virtual bool InsertPacket(const VCMPacket& packet);
// Returns true if |packet| is inserted into the packet buffer, false
// otherwise. The PacketBuffer will always take ownership of the
// |packet.dataPtr| when this function is called. Made virtual for testing.
virtual bool InsertPacket(VCMPacket* packet);
void ClearTo(uint16_t seq_num);
void Clear();