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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1635083002: Fix type of local encoded length variable from uint32_t to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 | no next file » | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 RTPFragmentationHeader frag_info; 971 RTPFragmentationHeader frag_info;
972 // token_partitions_ is number of bits used. 972 // token_partitions_ is number of bits used.
973 frag_info.VerifyAndAllocateFragmentationHeader((1 << token_partitions_) + 973 frag_info.VerifyAndAllocateFragmentationHeader((1 << token_partitions_) +
974 1); 974 1);
975 CodecSpecificInfo codec_specific; 975 CodecSpecificInfo codec_specific;
976 const vpx_codec_cx_pkt_t* pkt = NULL; 976 const vpx_codec_cx_pkt_t* pkt = NULL;
977 while ((pkt = vpx_codec_get_cx_data(&encoders_[encoder_idx], &iter)) != 977 while ((pkt = vpx_codec_get_cx_data(&encoders_[encoder_idx], &iter)) !=
978 NULL) { 978 NULL) {
979 switch (pkt->kind) { 979 switch (pkt->kind) {
980 case VPX_CODEC_CX_FRAME_PKT: { 980 case VPX_CODEC_CX_FRAME_PKT: {
981 uint32_t length = encoded_images_[encoder_idx]._length; 981 size_t length = encoded_images_[encoder_idx]._length;
982 if (pkt->data.frame.sz + length > 982 if (pkt->data.frame.sz + length >
983 encoded_images_[encoder_idx]._size) { 983 encoded_images_[encoder_idx]._size) {
984 uint8_t* buffer = new uint8_t[pkt->data.frame.sz + length]; 984 uint8_t* buffer = new uint8_t[pkt->data.frame.sz + length];
985 memcpy(buffer, encoded_images_[encoder_idx]._buffer, length); 985 memcpy(buffer, encoded_images_[encoder_idx]._buffer, length);
986 delete[] encoded_images_[encoder_idx]._buffer; 986 delete[] encoded_images_[encoder_idx]._buffer;
987 encoded_images_[encoder_idx]._buffer = buffer; 987 encoded_images_[encoder_idx]._buffer = buffer;
988 encoded_images_[encoder_idx]._size = pkt->data.frame.sz + length; 988 encoded_images_[encoder_idx]._size = pkt->data.frame.sz + length;
989 } 989 }
990 memcpy(&encoded_images_[encoder_idx]._buffer[length], 990 memcpy(&encoded_images_[encoder_idx]._buffer[length],
991 pkt->data.frame.buf, pkt->data.frame.sz); 991 pkt->data.frame.buf, pkt->data.frame.sz);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 return -1; 1409 return -1;
1410 } 1410 }
1411 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != 1411 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) !=
1412 VPX_CODEC_OK) { 1412 VPX_CODEC_OK) {
1413 return -1; 1413 return -1;
1414 } 1414 }
1415 return 0; 1415 return 0;
1416 } 1416 }
1417 1417
1418 } // namespace webrtc 1418 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698