OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 // Otherwise create one. | 67 // Otherwise create one. |
68 if (available_buffer == nullptr) { | 68 if (available_buffer == nullptr) { |
69 available_buffer = new rtc::RefCountedObject<Vp9FrameBuffer>(); | 69 available_buffer = new rtc::RefCountedObject<Vp9FrameBuffer>(); |
70 allocated_buffers_.push_back(available_buffer); | 70 allocated_buffers_.push_back(available_buffer); |
71 if (allocated_buffers_.size() > max_num_buffers_) { | 71 if (allocated_buffers_.size() > max_num_buffers_) { |
72 LOG(LS_WARNING) | 72 LOG(LS_WARNING) |
73 << allocated_buffers_.size() << " Vp9FrameBuffers have been " | 73 << allocated_buffers_.size() << " Vp9FrameBuffers have been " |
74 << "allocated by a Vp9FrameBufferPool (exceeding what is " | 74 << "allocated by a Vp9FrameBufferPool (exceeding what is " |
75 << "considered reasonable, " << max_num_buffers_ << ")."; | 75 << "considered reasonable, " << max_num_buffers_ << ")."; |
76 RTC_NOTREACHED(); | 76 |
| 77 // TODO(phoglund): this limit is being hit in tests since Oct 5 2016. |
| 78 // See https://bugs.chromium.org/p/webrtc/issues/detail?id=6484. |
| 79 // RTC_NOTREACHED(); |
77 } | 80 } |
78 } | 81 } |
79 } | 82 } |
80 | 83 |
81 available_buffer->SetSize(min_size); | 84 available_buffer->SetSize(min_size); |
82 return available_buffer; | 85 return available_buffer; |
83 } | 86 } |
84 | 87 |
85 int Vp9FrameBufferPool::GetNumBuffersInUse() const { | 88 int Vp9FrameBufferPool::GetNumBuffersInUse() const { |
86 int num_buffers_in_use = 0; | 89 int num_buffers_in_use = 0; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 buffer->Release(); | 130 buffer->Release(); |
128 // 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) |
129 // 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. |
130 // Setting |priv| to null protects against trying to Release multiple times. | 133 // Setting |priv| to null protects against trying to Release multiple times. |
131 fb->priv = nullptr; | 134 fb->priv = nullptr; |
132 } | 135 } |
133 return 0; | 136 return 0; |
134 } | 137 } |
135 | 138 |
136 } // namespace webrtc | 139 } // namespace webrtc |
OLD | NEW |