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

Unified Diff: webrtc/video/replay.cc

Issue 1855433002: Replace NULL with nullptr in webrtc/video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: replace x == nullptr with !x Created 4 years, 9 months 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 | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/replay.cc
diff --git a/webrtc/video/replay.cc b/webrtc/video/replay.cc
index affd033ff9d88fa22524ce7847eeb6e9dbf0412d..1dfc610f71a11d4b0b2017b069eddc4970a3844a 100644
--- a/webrtc/video/replay.cc
+++ b/webrtc/video/replay.cc
@@ -148,19 +148,19 @@ class FileRenderPassthrough : public rtc::VideoSinkInterface<VideoFrame> {
last_height_(0) {}
~FileRenderPassthrough() {
- if (file_ != nullptr)
+ if (file_)
fclose(file_);
}
private:
void OnFrame(const VideoFrame& video_frame) override {
- if (renderer_ != nullptr)
+ if (renderer_)
renderer_->OnFrame(video_frame);
if (basename_.empty())
return;
if (last_width_ != video_frame.width() ||
last_height_ != video_frame.height()) {
- if (file_ != nullptr)
+ if (file_)
fclose(file_);
std::stringstream filename;
filename << basename_;
@@ -169,7 +169,7 @@ class FileRenderPassthrough : public rtc::VideoSinkInterface<VideoFrame> {
filename << '_' << video_frame.width() << 'x' << video_frame.height()
<< ".yuv";
file_ = fopen(filename.str().c_str(), "wb");
- if (file_ == nullptr) {
+ if (!file_) {
fprintf(stderr,
"Couldn't open file for writing: %s\n",
filename.str().c_str());
@@ -177,7 +177,7 @@ class FileRenderPassthrough : public rtc::VideoSinkInterface<VideoFrame> {
}
last_width_ = video_frame.width();
last_height_ = video_frame.height();
- if (file_ == nullptr)
+ if (!file_)
return;
PrintVideoFrame(video_frame, file_);
}
@@ -194,7 +194,7 @@ class DecoderBitstreamFileWriter : public EncodedFrameObserver {
public:
explicit DecoderBitstreamFileWriter(const char* filename)
: file_(fopen(filename, "wb")) {
- RTC_DCHECK(file_ != nullptr);
+ RTC_DCHECK(file_);
}
~DecoderBitstreamFileWriter() { fclose(file_); }
@@ -255,17 +255,17 @@ void RtpReplay() {
std::unique_ptr<test::RtpFileReader> rtp_reader(test::RtpFileReader::Create(
test::RtpFileReader::kRtpDump, flags::InputFile()));
- if (rtp_reader.get() == nullptr) {
+ if (!rtp_reader) {
rtp_reader.reset(test::RtpFileReader::Create(test::RtpFileReader::kPcap,
flags::InputFile()));
- if (rtp_reader.get() == nullptr) {
+ if (!rtp_reader) {
fprintf(stderr,
"Couldn't open input file as either a rtpdump or .pcap. Note "
"that .pcapng is not supported.\nTrying to interpret the file as "
"length/packet interleaved.\n");
rtp_reader.reset(test::RtpFileReader::Create(
test::RtpFileReader::kLengthPacketInterleaved, flags::InputFile()));
- if (rtp_reader.get() == nullptr) {
+ if (!rtp_reader) {
fprintf(stderr,
"Unable to open input file with any supported format\n");
return;
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698