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

Unified Diff: content/common/gpu/media/v4l2_video_encode_accelerator.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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 | « content/common/gpu/media/v4l2_video_device.h ('k') | content/common/gpu/media/vaapi_h264_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/v4l2_video_encode_accelerator.cc
diff --git a/content/common/gpu/media/v4l2_video_encode_accelerator.cc b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
index d69c97da551c8a5dce5b1e78dc9b0b1c75ad0b80..7922764c9213e5aee2b77951d9741dbda11787ef 100644
--- a/content/common/gpu/media/v4l2_video_encode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
@@ -60,7 +60,7 @@ V4L2VideoEncodeAccelerator::InputRecord::InputRecord() : at_device(false) {
}
V4L2VideoEncodeAccelerator::OutputRecord::OutputRecord()
- : at_device(false), address(NULL), length(0) {
+ : at_device(false), address(nullptr), length(0) {
}
V4L2VideoEncodeAccelerator::V4L2VideoEncodeAccelerator(
@@ -507,7 +507,7 @@ void V4L2VideoEncodeAccelerator::Dequeue() {
DCHECK(input_record.at_device);
input_record.at_device = false;
- input_record.frame = NULL;
+ input_record.frame = nullptr;
free_input_buffers_.push_back(dqbuf.index);
input_buffer_queued_count_--;
}
@@ -717,7 +717,7 @@ bool V4L2VideoEncodeAccelerator::StopDevicePoll() {
for (size_t i = 0; i < input_buffer_map_.size(); ++i) {
InputRecord& input_record = input_buffer_map_[i];
input_record.at_device = false;
- input_record.frame = NULL;
+ input_record.frame = nullptr;
free_input_buffers_.push_back(i);
}
input_buffer_queued_count_ = 0;
@@ -777,7 +777,7 @@ void V4L2VideoEncodeAccelerator::SetEncoderState(State state) {
// We can touch encoder_state_ only if this is the encoder thread or the
// encoder thread isn't running.
- if (encoder_thread_.message_loop() != NULL &&
+ if (encoder_thread_.message_loop() != nullptr &&
encoder_thread_.message_loop() != base::MessageLoop::current()) {
encoder_thread_.message_loop()->PostTask(
FROM_HERE,
@@ -1040,7 +1040,7 @@ bool V4L2VideoEncodeAccelerator::CreateOutputBuffers() {
buffer.m.planes = planes;
buffer.length = arraysize(planes);
IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYBUF, &buffer);
- void* address = device_->Mmap(NULL,
+ void* address = device_->Mmap(nullptr,
buffer.m.planes[0].length,
PROT_READ | PROT_WRITE,
MAP_SHARED,
@@ -1079,7 +1079,7 @@ void V4L2VideoEncodeAccelerator::DestroyOutputBuffers() {
DCHECK(!output_streamon_);
for (size_t i = 0; i < output_buffer_map_.size(); ++i) {
- if (output_buffer_map_[i].address != NULL)
+ if (output_buffer_map_[i].address != nullptr)
device_->Munmap(output_buffer_map_[i].address,
output_buffer_map_[i].length);
}
« no previous file with comments | « content/common/gpu/media/v4l2_video_device.h ('k') | content/common/gpu/media/vaapi_h264_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698