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

Unified Diff: webrtc/modules/video_coding/h264_sprop_parameter_sets.cc

Issue 2568953005: Remove static cast from H264SpropParameterSets. (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/h264_sprop_parameter_sets.cc
diff --git a/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc b/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc
index b9f32d7f019533e91458941ddd339e8381dc1048..d2e37232a8614be285f0f2fae19e45834aa0d3da 100644
--- a/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc
+++ b/webrtc/modules/video_coding/h264_sprop_parameter_sets.cc
@@ -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
« 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