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

Unified Diff: media/test/ffmpeg_tests/ffmpeg_tests.cc

Issue 7466003: MD5Update function uses StringPiece instead of raw buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove line from license. Created 9 years, 5 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
« no previous file with comments | « chrome/common/visitedlink_common.cc ('k') | media/tools/media_bench/media_bench.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/ffmpeg_tests/ffmpeg_tests.cc
diff --git a/media/test/ffmpeg_tests/ffmpeg_tests.cc b/media/test/ffmpeg_tests/ffmpeg_tests.cc
index 8c0bc7c7a04dd3cce80f6601c7cf5f100f71b2d1..e91ca00c4211b9ee71dc8f9fd56cb9d1ddd50f12 100644
--- a/media/test/ffmpeg_tests/ffmpeg_tests.cc
+++ b/media/test/ffmpeg_tests/ffmpeg_tests.cc
@@ -316,8 +316,12 @@ int main(int argc, const char** argv) {
if (hash_djb2) {
hash_value = DJB2Hash(u8_samples, size_out, hash_value);
}
- if (hash_md5)
- base::MD5Update(&ctx, u8_samples, size_out);
+ if (hash_md5) {
+ base::MD5Update(
+ &ctx,
+ base::StringPiece(
+ reinterpret_cast<const char*>(u8_samples), size_out));
+ }
}
} else if (target_codec == AVMEDIA_TYPE_VIDEO) {
int got_picture = 0;
@@ -377,8 +381,10 @@ int main(int argc, const char** argv) {
}
if (hash_md5) {
for (size_t i = 0; i < copy_lines; ++i) {
- base::MD5Update(&ctx, reinterpret_cast<const uint8*>(source),
- bytes_per_line);
+ base::MD5Update(
+ &ctx,
+ base::StringPiece(reinterpret_cast<const char*>(source),
+ bytes_per_line));
source += source_stride;
}
}
@@ -497,4 +503,3 @@ int main(int argc, const char** argv) {
CommandLine::Reset();
return 0;
}
-
« no previous file with comments | « chrome/common/visitedlink_common.cc ('k') | media/tools/media_bench/media_bench.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698