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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10896014: Add a bool return value to media::Decryptor::GenerateKeyRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve comments. Created 8 years, 4 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 | « webkit/media/crypto/proxy_decryptor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 0b9cc7a770757fbf667efab82d1cdfb8467ea77f..030e57a28d67e93862132d12f0b9803d24b7084e 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -724,8 +724,12 @@ WebMediaPlayerImpl::generateKeyRequest(const WebString& key_system,
<< std::string(reinterpret_cast<const char*>(init_data),
static_cast<size_t>(init_data_length));
- decryptor_.GenerateKeyRequest(key_system.utf8(),
- init_data, init_data_length);
+ if (!decryptor_.GenerateKeyRequest(key_system.utf8(),
+ init_data, init_data_length)) {
+ current_key_system_.reset();
+ return WebKit::WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported;
+ }
+
return WebKit::WebMediaPlayer::MediaKeyExceptionNoError;
}
« no previous file with comments | « webkit/media/crypto/proxy_decryptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698