Revert of Remove webrtc/base/scoped_ptr.h (patchset #3 id:100001 of https://codereview.webrtc.org/1942823002/ )
Reason for revert: Breaks user code. Said code needs to stop using scoped_ptr! Original issue's description: > Remove webrtc/base/scoped_ptr.h > > BUG=webrtc:5520 > > NOTRY=True > > Committed: https://crrev.com/65fc62e9dd8a8716db625aaef76ab92f542ecc5a > Cr-Commit-Position: refs/heads/master@{#12684} TBR=tommi@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5520 Review-Url: https://codereview.webrtc.org/1965063003 Cr-Commit-Position: refs/heads/master@{#12686}
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/base/criticalsection.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/base/thread_annotations.h"
|
||||
#include "webrtc/modules/include/module_common_types.h"
|
||||
#include "webrtc/modules/video_coding/packet.h"
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
@ -342,7 +341,7 @@ class RtpPlayerImpl : public RtpPlayerInterface {
|
||||
assert(packet_source);
|
||||
assert(packet_source->get());
|
||||
packet_source_.swap(*packet_source);
|
||||
std::srand(321);
|
||||
srand(321);
|
||||
}
|
||||
|
||||
virtual ~RtpPlayerImpl() {}
|
||||
@ -435,8 +434,7 @@ class RtpPlayerImpl : public RtpPlayerInterface {
|
||||
|
||||
if (no_loss_startup_ > 0) {
|
||||
no_loss_startup_--;
|
||||
} else if ((std::rand() + 1.0) / (RAND_MAX + 1.0) <
|
||||
loss_rate_) { // NOLINT
|
||||
} else if ((rand() + 1.0) / (RAND_MAX + 1.0) < loss_rate_) { // NOLINT
|
||||
uint16_t seq_num = header.sequenceNumber;
|
||||
lost_packets_.AddPacket(new RawRtpPacket(data, length, ssrc, seq_num));
|
||||
DEBUG_LOG1("Dropped packet: %d!", header.header.sequenceNumber);
|
||||
|
||||
Reference in New Issue
Block a user