diff --git a/packager/media/formats/wvm/wvm_media_parser.cc b/packager/media/formats/wvm/wvm_media_parser.cc index 8fa47e6e37..30ced3dd1d 100644 --- a/packager/media/formats/wvm/wvm_media_parser.cc +++ b/packager/media/formats/wvm/wvm_media_parser.cc @@ -1113,9 +1113,10 @@ bool WvmMediaParser::ProcessEcm() { std::vector asset_key( encryption_key.key.begin(), encryption_key.key.begin() + kAssetKeySizeBytes); - std::vector iv(kInitializationVectorSizeBytes); + // WVM format always uses all zero IV. + std::vector zero_iv(kInitializationVectorSizeBytes, 0); AesCbcDecryptor asset_decryptor(kCtsPadding, AesCryptor::kUseConstantIv); - if (!asset_decryptor.InitializeWithIv(asset_key, iv)) { + if (!asset_decryptor.InitializeWithIv(asset_key, zero_iv)) { LOG(ERROR) << "Failed to initialize asset_decryptor."; return false; } @@ -1132,7 +1133,8 @@ bool WvmMediaParser::ProcessEcm() { content_key_buffer.begin() + 20); scoped_ptr content_decryptor( new AesCbcDecryptor(kCtsPadding, AesCryptor::kUseConstantIv)); - if (!content_decryptor->InitializeWithIv(decrypted_content_key_vec, iv)) { + if (!content_decryptor->InitializeWithIv(decrypted_content_key_vec, + zero_iv)) { LOG(ERROR) << "Failed to initialize content decryptor."; return false; }