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

Side by Side Diff: webrtc/modules/video_coding/packet_buffer.cc

Issue 2603223002: PacketBuffer now correctly cast sequence numbers to uint16_t. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | webrtc/modules/video_coding/video_packet_buffer_unittest.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 if (!sequence_buffer_[index].used) 181 if (!sequence_buffer_[index].used)
182 return false; 182 return false;
183 if (sequence_buffer_[index].frame_created) 183 if (sequence_buffer_[index].frame_created)
184 return false; 184 return false;
185 if (sequence_buffer_[index].frame_begin) 185 if (sequence_buffer_[index].frame_begin)
186 return true; 186 return true;
187 if (!sequence_buffer_[prev_index].used) 187 if (!sequence_buffer_[prev_index].used)
188 return false; 188 return false;
189 if (sequence_buffer_[prev_index].seq_num != 189 if (sequence_buffer_[prev_index].seq_num !=
190 sequence_buffer_[index].seq_num - 1) { 190 static_cast<uint16_t>(sequence_buffer_[index].seq_num - 1)) {
191 return false; 191 return false;
192 } 192 }
193 if (sequence_buffer_[prev_index].continuous) 193 if (sequence_buffer_[prev_index].continuous)
194 return true; 194 return true;
195 195
196 return false; 196 return false;
197 } 197 }
198 198
199 std::vector<std::unique_ptr<RtpFrameObject>> PacketBuffer::FindFrames( 199 std::vector<std::unique_ptr<RtpFrameObject>> PacketBuffer::FindFrames(
200 uint16_t seq_num) { 200 uint16_t seq_num) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 int PacketBuffer::Release() const { 293 int PacketBuffer::Release() const {
294 int count = rtc::AtomicOps::Decrement(&ref_count_); 294 int count = rtc::AtomicOps::Decrement(&ref_count_);
295 if (!count) { 295 if (!count) {
296 delete this; 296 delete this;
297 } 297 }
298 return count; 298 return count;
299 } 299 }
300 300
301 } // namespace video_coding 301 } // namespace video_coding
302 } // namespace webrtc 302 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/video_packet_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698