| Index: media/webm/webm_content_encodings_client.cc
|
| diff --git a/media/webm/webm_content_encodings_client.cc b/media/webm/webm_content_encodings_client.cc
|
| index 086f85b60b5e8151488f5e97cc7d2bcafa7a50f7..a24b4bfa672946cdfbc8a475bbb709b104b391ef 100644
|
| --- a/media/webm/webm_content_encodings_client.cc
|
| +++ b/media/webm/webm_content_encodings_client.cc
|
| @@ -50,6 +50,11 @@ WebMParserClient* WebMContentEncodingsClient::OnListStart(int id) {
|
| return this;
|
| }
|
|
|
| + if (id == kWebMIdContentEncAESSettings) {
|
| + DCHECK(cur_content_encoding_.get());
|
| + return this;
|
| + }
|
| +
|
| // This should not happen if WebMListParser is working properly.
|
| DCHECK(false);
|
| return NULL;
|
| @@ -121,6 +126,13 @@ bool WebMContentEncodingsClient::OnListEnd(int id) {
|
| return true;
|
| }
|
|
|
| + if (id == kWebMIdContentEncAESSettings) {
|
| + if (cur_content_encoding_->cipher_mode() ==
|
| + ContentEncoding::kCipherModeInvalid)
|
| + cur_content_encoding_->set_cipher_mode(ContentEncoding::kCipherModeCtr);
|
| + return true;
|
| + }
|
| +
|
| // This should not happen if WebMListParser is working properly.
|
| DCHECK(false);
|
| return false;
|
| @@ -206,6 +218,23 @@ bool WebMContentEncodingsClient::OnUInt(int id, int64 val) {
|
| return true;
|
| }
|
|
|
| + if (id == kWebMIdAESSettingsCipherMode) {
|
| + if (cur_content_encoding_->cipher_mode() !=
|
| + ContentEncoding::kCipherModeInvalid) {
|
| + DVLOG(1) << "Unexpected multiple AESSettingsCipherMode.";
|
| + return false;
|
| + }
|
| +
|
| + if (val != ContentEncoding::kCipherModeCtr) {
|
| + DVLOG(1) << "Unexpected AESSettingsCipherMode " << val << ".";
|
| + return false;
|
| + }
|
| +
|
| + cur_content_encoding_->set_cipher_mode(
|
| + static_cast<ContentEncoding::CipherMode>(val));
|
| + return true;
|
| + }
|
| +
|
| // This should not happen if WebMListParser is working properly.
|
| DCHECK(false);
|
| return false;
|
|
|