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

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: Attempted test fix 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 427601e7a34d24659ea2d31ee0dc578914873113..ec9ccaae3e784a692830d8fe057d56270d07cbf4 100644
--- a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
@@ -643,8 +643,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) {
@@ -695,7 +695,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;
@@ -711,7 +711,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;
@@ -736,8 +736,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);

Powered by Google App Engine
This is Rietveld 408576698