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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc

Issue 2535593002: RTC_[D]CHECK_op: Remove "u" suffix on integer constants (Closed)
Patch Set: Created 4 years 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 | « webrtc/modules/video_coding/codec_database.cc ('k') | webrtc/modules/video_coding/histogram.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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 */ 10 */
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // |this| will be passed as |user_priv| to VpxGetFrameBuffer. 46 // |this| will be passed as |user_priv| to VpxGetFrameBuffer.
47 this)) { 47 this)) {
48 // Failed to configure libvpx to use Vp9FrameBufferPool. 48 // Failed to configure libvpx to use Vp9FrameBufferPool.
49 return false; 49 return false;
50 } 50 }
51 return true; 51 return true;
52 } 52 }
53 53
54 rtc::scoped_refptr<Vp9FrameBufferPool::Vp9FrameBuffer> 54 rtc::scoped_refptr<Vp9FrameBufferPool::Vp9FrameBuffer>
55 Vp9FrameBufferPool::GetFrameBuffer(size_t min_size) { 55 Vp9FrameBufferPool::GetFrameBuffer(size_t min_size) {
56 RTC_DCHECK_GT(min_size, 0u); 56 RTC_DCHECK_GT(min_size, 0);
57 rtc::scoped_refptr<Vp9FrameBuffer> available_buffer = nullptr; 57 rtc::scoped_refptr<Vp9FrameBuffer> available_buffer = nullptr;
58 { 58 {
59 rtc::CritScope cs(&buffers_lock_); 59 rtc::CritScope cs(&buffers_lock_);
60 // Do we have a buffer we can recycle? 60 // Do we have a buffer we can recycle?
61 for (const auto& buffer : allocated_buffers_) { 61 for (const auto& buffer : allocated_buffers_) {
62 if (buffer->HasOneRef()) { 62 if (buffer->HasOneRef()) {
63 available_buffer = buffer; 63 available_buffer = buffer;
64 break; 64 break;
65 } 65 }
66 } 66 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 buffer->Release(); 130 buffer->Release();
131 // When libvpx fails to decode and you continue to try to decode (and fail) 131 // When libvpx fails to decode and you continue to try to decode (and fail)
132 // libvpx can for some reason try to release the same buffer multiple times. 132 // libvpx can for some reason try to release the same buffer multiple times.
133 // Setting |priv| to null protects against trying to Release multiple times. 133 // Setting |priv| to null protects against trying to Release multiple times.
134 fb->priv = nullptr; 134 fb->priv = nullptr;
135 } 135 }
136 return 0; 136 return 0;
137 } 137 }
138 138
139 } // namespace webrtc 139 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | webrtc/modules/video_coding/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698