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

Unified Diff: media/crypto/aes_decryptor.cc

Issue 10831115: Revert 149449 - Add support for v0.3 of the encrypted WebM specification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | « media/base/decrypt_config.cc ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/crypto/aes_decryptor.cc
===================================================================
--- media/crypto/aes_decryptor.cc (revision 149456)
+++ media/crypto/aes_decryptor.cc (working copy)
@@ -285,24 +285,17 @@
return;
}
- scoped_refptr<DecoderBuffer> decrypted;
- // An empty iv string signals that the frame is unencrypted.
- if (encrypted->GetDecryptConfig()->iv().empty()) {
- int data_offset = encrypted->GetDecryptConfig()->data_offset();
- decrypted = DecoderBuffer::CopyFrom(encrypted->GetData() + data_offset,
- encrypted->GetDataSize() - data_offset);
- } else {
- // TODO(strobe): Currently, presence of checksum is used to indicate the use
- // of normal or WebM decryption keys. Consider a more explicit signaling
- // mechanism and the removal of the webm_decryption_key member.
- crypto::SymmetricKey* decryption_key = (checksum_size > 0) ?
- key->webm_decryption_key() : key->decryption_key();
- decrypted = DecryptData(*encrypted, decryption_key);
- if (!decrypted) {
- DVLOG(1) << "Decryption failed.";
- decrypt_cb.Run(kError, NULL);
- return;
- }
+ // TODO(strobe): Currently, presence of checksum is used to indicate the use
+ // of normal or WebM decryption keys. Consider a more explicit signaling
+ // mechanism and the removal of the webm_decryption_key member.
+ crypto::SymmetricKey* decryption_key = (checksum_size > 0) ?
+ key->webm_decryption_key() : key->decryption_key();
+ scoped_refptr<DecoderBuffer> decrypted =
+ DecryptData(*encrypted, decryption_key);
+ if (!decrypted) {
+ DVLOG(1) << "Decryption failed.";
+ decrypt_cb.Run(kError, NULL);
+ return;
}
decrypted->SetTimestamp(encrypted->GetTimestamp());
« no previous file with comments | « media/base/decrypt_config.cc ('k') | media/crypto/aes_decryptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698