Index: webrtc/modules/video_coding/codecs/test/packet_manipulator.cc |
diff --git a/webrtc/modules/video_coding/codecs/test/packet_manipulator.cc b/webrtc/modules/video_coding/codecs/test/packet_manipulator.cc |
index b554b4e9aec50307a7305959af7a5253d8f78d85..9bde45eeffc808cd16253f6b664d5c8d08e53627 100644 |
--- a/webrtc/modules/video_coding/codecs/test/packet_manipulator.cc |
+++ b/webrtc/modules/video_coding/codecs/test/packet_manipulator.cc |
@@ -24,16 +24,11 @@ PacketManipulatorImpl::PacketManipulatorImpl(PacketReader* packet_reader, |
: packet_reader_(packet_reader), |
config_(config), |
active_burst_packets_(0), |
- critsect_(CriticalSectionWrapper::CreateCriticalSection()), |
random_seed_(1), |
verbose_(verbose) { |
assert(packet_reader); |
} |
-PacketManipulatorImpl::~PacketManipulatorImpl() { |
- delete critsect_; |
-} |
- |
int PacketManipulatorImpl::ManipulatePackets( |
webrtc::EncodedImage* encoded_image) { |
int nbr_packets_dropped = 0; |
@@ -89,10 +84,10 @@ inline double PacketManipulatorImpl::RandomUniform() { |
// Use the previous result as new seed before each rand() call. Doing this |
// it doesn't matter if other threads are calling rand() since we'll always |
// get the same behavior as long as we're using a fixed initial seed. |
- critsect_->Enter(); |
+ critsect_.Enter(); |
srand(random_seed_); |
random_seed_ = rand(); // NOLINT (rand_r instead of rand) |
- critsect_->Leave(); |
+ critsect_.Leave(); |
return (random_seed_ + 1.0) / (RAND_MAX + 1.0); |
} |