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

Unified Diff: content/common/gpu/media/vaapi_h264_decoder.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
Index: content/common/gpu/media/vaapi_h264_decoder.cc
diff --git a/content/common/gpu/media/vaapi_h264_decoder.cc b/content/common/gpu/media/vaapi_h264_decoder.cc
index 91e76af81becc6129c0be3f79e3b3d4460e0cd86..a1213aef64181868e60dd9481df556416a96cceb 100644
--- a/content/common/gpu/media/vaapi_h264_decoder.cc
+++ b/content/common/gpu/media/vaapi_h264_decoder.cc
@@ -181,7 +181,7 @@ VaapiH264Decoder::DecodeSurface* VaapiH264Decoder::DecodeSurfaceByPoC(int poc) {
DecSurfacesInUse::iterator iter = decode_surfaces_in_use_.find(poc);
if (iter == decode_surfaces_in_use_.end()) {
DVLOG(1) << "Could not find surface assigned to POC: " << poc;
- return NULL;
+ return nullptr;
}
return iter->second.get();
@@ -1265,7 +1265,7 @@ void VaapiH264Decoder::ReferencePictureMarking() {
// Find smallest frame_num_wrap short reference picture and mark
// it as unused.
H264Picture* to_unmark = dpb_.GetLowestFrameNumWrapShortRefPic();
- if (to_unmark == NULL) {
+ if (to_unmark == nullptr) {
DVLOG(1) << "Couldn't find a short ref picture to unmark";
return;
}
@@ -1518,7 +1518,7 @@ bool VaapiH264Decoder::ProcessPPS(int pps_id) {
bool VaapiH264Decoder::FinishPrevFrameIfPresent() {
// If we already have a frame waiting to be decoded, decode it and finish.
- if (curr_pic_ != NULL) {
+ if (curr_pic_ != nullptr) {
if (!DecodePicture())
return false;
return FinishPicture();
@@ -1543,7 +1543,7 @@ bool VaapiH264Decoder::ProcessSlice(media::H264SliceHeader* slice_hdr) {
max_pic_num_ = 2 * max_frame_num_;
// TODO posciak: switch to new picture detection per 7.4.1.2.4.
- if (curr_pic_ != NULL && slice_hdr->first_mb_in_slice != 0) {
+ if (curr_pic_ != nullptr && slice_hdr->first_mb_in_slice != 0) {
// This is just some more slice data of the current picture, so
// just queue it and return.
QueueSlice(slice_hdr);
« no previous file with comments | « content/common/gpu/media/v4l2_video_encode_accelerator.cc ('k') | content/common/gpu/media/vaapi_h264_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698