Index: source/libvpx/test/vp8_decrypt_test.cc |
=================================================================== |
--- source/libvpx/test/vp8_decrypt_test.cc (revision 263011) |
+++ source/libvpx/test/vp8_decrypt_test.cc (working copy) |
@@ -26,9 +26,9 @@ |
0x89, 0x9a, 0xab, 0xbc, 0xcd, 0xde, 0xef, 0xf0 |
}; |
-void encrypt_buffer(const uint8_t *src, uint8_t *dst, |
- int size, int offset = 0) { |
- for (int i = 0; i < size; ++i) { |
+void encrypt_buffer(const uint8_t *src, uint8_t *dst, size_t size, |
+ ptrdiff_t offset) { |
+ for (size_t i = 0; i < size; ++i) { |
dst[i] = src[i] ^ test_key[(offset + i) & 15]; |
} |
} |
@@ -61,7 +61,7 @@ |
#if CONFIG_DECRYPT |
std::vector<uint8_t> encrypted(video.frame_size()); |
- encrypt_buffer(video.cxdata(), &encrypted[0], video.frame_size()); |
+ encrypt_buffer(video.cxdata(), &encrypted[0], video.frame_size(), 0); |
vp8_decrypt_init di = { test_decrypt_cb, &encrypted[0] }; |
decoder.Control(VP8D_SET_DECRYPTOR, &di); |
#endif // CONFIG_DECRYPT |