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

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

Issue 2476283002: PacketBuffer no longer copy the bitstream data of incoming packets. (Closed)
Patch Set: 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/video_packet_buffer_unittest.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.cc
diff --git a/webrtc/modules/video_coding/packet_buffer.cc b/webrtc/modules/video_coding/packet_buffer.cc
index 2eafaed5ea3a14c47e9f6a983aeb9930fcc2dbfb..58ad31e50cefda7c959cdeffb08d22b61e795c94 100644
--- a/webrtc/modules/video_coding/packet_buffer.cc
+++ b/webrtc/modules/video_coding/packet_buffer.cc
@@ -100,16 +100,6 @@ bool PacketBuffer::InsertPacket(const VCMPacket& packet) {
sequence_buffer_[index].used = true;
data_buffer_[index] = packet;
- // Since the data pointed to by |packet.dataPtr| is non-persistent the
- // data has to be copied to its own buffer.
- // TODO(philipel): Take ownership instead of copying payload when
- // bitstream-fixing has been implemented.
- if (packet.sizeBytes) {
- uint8_t* payload = new uint8_t[packet.sizeBytes];
- memcpy(payload, packet.dataPtr, packet.sizeBytes);
- data_buffer_[index].dataPtr = payload;
- }
-
FindFrames(seq_num);
return true;
}
« no previous file with comments | « no previous file | webrtc/modules/video_coding/video_packet_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698