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

Side by Side Diff: media/gpu/h264_decoder.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « media/blink/video_frame_compositor.cc ('k') | mojo/edk/system/shared_buffer_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 if (!UpdateMaxNumReorderFrames(sps)) 1134 if (!UpdateMaxNumReorderFrames(sps))
1135 return false; 1135 return false;
1136 DVLOG(1) << "max_num_reorder_frames: " << max_num_reorder_frames_; 1136 DVLOG(1) << "max_num_reorder_frames: " << max_num_reorder_frames_;
1137 1137
1138 *need_new_buffers = true; 1138 *need_new_buffers = true;
1139 return true; 1139 return true;
1140 } 1140 }
1141 1141
1142 bool H264Decoder::FinishPrevFrameIfPresent() { 1142 bool H264Decoder::FinishPrevFrameIfPresent() {
1143 // If we already have a frame waiting to be decoded, decode it and finish. 1143 // If we already have a frame waiting to be decoded, decode it and finish.
1144 if (curr_pic_ != NULL) { 1144 if (curr_pic_) {
1145 if (!DecodePicture()) 1145 if (!DecodePicture())
1146 return false; 1146 return false;
1147 1147
1148 scoped_refptr<H264Picture> pic = curr_pic_; 1148 scoped_refptr<H264Picture> pic = curr_pic_;
1149 curr_pic_ = nullptr; 1149 curr_pic_ = nullptr;
1150 return FinishPicture(pic); 1150 return FinishPicture(pic);
1151 } 1151 }
1152 1152
1153 return true; 1153 return true;
1154 } 1154 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 1429
1430 gfx::Size H264Decoder::GetPicSize() const { 1430 gfx::Size H264Decoder::GetPicSize() const {
1431 return pic_size_; 1431 return pic_size_;
1432 } 1432 }
1433 1433
1434 size_t H264Decoder::GetRequiredNumOfPictures() const { 1434 size_t H264Decoder::GetRequiredNumOfPictures() const {
1435 return dpb_.max_num_pics() + kPicsInPipeline; 1435 return dpb_.max_num_pics() + kPicsInPipeline;
1436 } 1436 }
1437 1437
1438 } // namespace media 1438 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/video_frame_compositor.cc ('k') | mojo/edk/system/shared_buffer_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698