Remove static cast from H264SpropParameterSets.

This CL is chained to https://codereview.webrtc.org/2539153002/ .

BUG=webrtc:5948

Review-Url: https://codereview.webrtc.org/2568953005
Cr-Commit-Position: refs/heads/master@{#15607}
This commit is contained in:
johan 2016-12-14 06:08:33 -08:00 committed by Commit bot
parent 930959d261
commit e2ec7c270b

View File

@ -20,15 +20,8 @@
namespace {
bool DecodeAndConvert(const std::string& base64, std::vector<uint8_t>* binary) {
// TODO(johan): Directly decode to std::vector<uint8_t> when available.
std::vector<char> tmp;
if (!rtc::Base64::DecodeFromArray(base64.data(), base64.size(),
rtc::Base64::DO_STRICT, &tmp, nullptr)) {
return false;
}
const uint8_t* data = reinterpret_cast<uint8_t*>(tmp.data());
binary->assign(data, data + tmp.size());
return true;
return rtc::Base64::DecodeFromArray(base64.data(), base64.size(),
rtc::Base64::DO_STRICT, binary, nullptr);
}
} // namespace