PacketBuffer is now ref counted.
Since all FrameObjects have a reference to its PacketBuffer and since
the PacketBuffer can be thrown away at any moment the PacketBuffer
has to be ref counted in order to avoid FrameObjects dereferencing a potentially
destroyed object.
BUG=webrtc:5514
R=danilchap@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/2199133004 .
Cr-Commit-Position: refs/heads/master@{#13725}
diff --git a/webrtc/modules/video_coding/frame_object.h b/webrtc/modules/video_coding/frame_object.h
index 5b299e6..a63ae99 100644
--- a/webrtc/modules/video_coding/frame_object.h
+++ b/webrtc/modules/video_coding/frame_object.h
@@ -75,7 +75,7 @@
RTPVideoTypeHeader* GetCodecHeader() const;
private:
- PacketBuffer* packet_buffer_;
+ rtc::scoped_refptr<PacketBuffer> packet_buffer_;
enum FrameType frame_type_;
VideoCodecType codec_type_;
uint16_t first_seq_num_;