Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: webrtc/modules/video_coding/packet_buffer.h

Issue 2535203002: Fix memory leak in video_coding::PacketBuffer::InsertPacket. (Closed)
Patch Set: Feedback fix. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/packet_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/packet_buffer.h
diff --git a/webrtc/modules/video_coding/packet_buffer.h b/webrtc/modules/video_coding/packet_buffer.h
index 36b302715858b584a5d9f7922b70e125e022fa59..da7e80ffaa81d0e310d1587cdafb2877c183c674 100644
--- a/webrtc/modules/video_coding/packet_buffer.h
+++ b/webrtc/modules/video_coding/packet_buffer.h
@@ -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();
« no previous file with comments | « no previous file | webrtc/modules/video_coding/packet_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698