aboutsummaryrefslogtreecommitdiff
path: root/talk/session
diff options
context:
space:
mode:
authorKarl Wiberg <kwiberg@webrtc.org>2015-04-30 14:25:03 +0200
committerKarl Wiberg <kwiberg@webrtc.org>2015-04-30 12:25:06 +0000
commit9e1a6d7c236c9a8a322bef54d4ec2a087e5baa07 (patch)
treee84e1e2eb8aae0248e37b7de990c24fbf4f68914 /talk/session
parentff019b0b551888330b69d6323506eae710e1ab6d (diff)
downloadwebrtc-9e1a6d7c236c9a8a322bef54d4ec2a087e5baa07.tar.gz
rtc::Buffer: Remove backwards compatibility band-aids
This CL makes two changes to rtc::Buffer that have had to wait for Chromium's use of it to be modernized: 1. Change default return type of rtc::Buffer::data() from char* to uint8_t*. uint8_t is a more natural type for bytes, and won't accidentally convert to a string. (Chromium previously expected the default return type to be char, which is why rtc::Buffer::data() initially got char as default return type in 9478437f, but that's been fixed now.) 2. Stop accepting void* inputs in constructors and methods. While this is convenient, it's also dangerous since any pointer type will implicitly convert to void*. R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/44269004 Cr-Commit-Position: refs/heads/master@{#9121}
Diffstat (limited to 'talk/session')
-rw-r--r--talk/session/media/channel.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc
index 1ce65fafd0..0034f15d9b 100644
--- a/talk/session/media/channel.cc
+++ b/talk/session/media/channel.cc
@@ -512,7 +512,7 @@ bool BaseChannel::SendPacket(bool rtcp, rtc::Buffer* packet,
// Protect if needed.
if (srtp_filter_.IsActive()) {
bool res;
- uint8_t* data = packet->data<uint8_t>();
+ uint8_t* data = packet->data();
int len = static_cast<int>(packet->size());
if (!rtcp) {
// If ENABLE_EXTERNAL_AUTH flag is on then packet authentication is not done