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

Unified Diff: webrtc/modules/audio_coding/neteq/test/RTPencode.cc

Issue 1168753002: Match existing type usage better. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/test/RTPencode.cc
diff --git a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
index c097f5f28d3a391d53b50ef6dc9f3832f32746e6..192d3748af133d41b8b4a70414f405b1e3c7ca3c 100644
--- a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
@@ -621,8 +621,8 @@ int main(int argc, char* argv[]) {
}
/* write RTP packet to file */
- length = htons(12 + enc_len + 8);
- plen = htons(12 + enc_len);
+ length = htons(static_cast<unsigned short>(12 + enc_len + 8));
+ plen = htons(static_cast<unsigned short>(12 + enc_len));
offset = (uint32_t)sendtime; //(timestamp/(fs/1000));
offset = htonl(offset);
if (fwrite(&length, 2, 1, out_file) != 1) {
@@ -673,7 +673,7 @@ int main(int argc, char* argv[]) {
memmove(&rtp_data[RTPheaderLen + red_len[0]], &rtp_data[12], enc_len);
memcpy(&rtp_data[RTPheaderLen], red_data, red_len[0]);
- red_len[1] = enc_len;
+ red_len[1] = static_cast<uint16_t>(enc_len);
red_TS[1] = timestamp;
if (vad)
red_PT[1] = payloadType;
@@ -689,7 +689,7 @@ int main(int argc, char* argv[]) {
memmove(&rtp_data[RTPheaderLen - 4], &rtp_data[12], enc_len);
// memcpy(&rtp_data[RTPheaderLen], red_data, red_len[0]);
- red_len[1] = enc_len;
+ red_len[1] = static_cast<uint16_t>(enc_len);
red_TS[1] = timestamp;
if (vad)
red_PT[1] = payloadType;
@@ -714,8 +714,8 @@ int main(int argc, char* argv[]) {
do {
#endif // MULTIPLE_SAME_TIMESTAMP
/* write RTP packet to file */
- length = htons(12 + enc_len + 8);
- plen = htons(12 + enc_len);
+ length = htons(static_cast<unsigned short>(12 + enc_len + 8));
+ plen = htons(static_cast<unsigned short>(12 + enc_len));
offset = (uint32_t)sendtime;
//(timestamp/(fs/1000));
offset = htonl(offset);
« no previous file with comments | « webrtc/modules/audio_coding/neteq/statistics_calculator.cc ('k') | webrtc/modules/audio_device/audio_device_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698