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

Unified Diff: ppapi/proxy/ppp_content_decryptor_private_proxy.cc

Issue 10899021: Add CDM video decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests on linux. Created 8 years, 2 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 | « ppapi/proxy/ppb_instance_proxy.cc ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_content_decryptor_private_proxy.cc
diff --git a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
index 29190afcd9ffe4292fa9bc447d7f9ec9168e6675..e04e4cbca2c5c6b4e69928e5c462bb5569435998 100644
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
@@ -485,10 +485,14 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgDecryptAndDecode(
const PPPDecryptor_Buffer& encrypted_buffer,
const std::string& serialized_block_info) {
if (ppp_decryptor_impl_) {
- PP_Resource plugin_resource =
- PPB_Buffer_Proxy::AddProxyResource(encrypted_buffer.resource,
- encrypted_buffer.handle,
- encrypted_buffer.size);
+ PP_Resource plugin_resource = 0;
xhwang 2012/10/19 07:12:40 Since PP_Resource of 0 can happen if error happens
Tom Finegan 2012/10/20 00:57:17 Discussion in progress offline, but I don't think
+ if (encrypted_buffer.size > 0) {
+ plugin_resource =
+ PPB_Buffer_Proxy::AddProxyResource(encrypted_buffer.resource,
brettw 2012/10/19 23:03:54 If you don't hit this line I believe encrypted_buf
Tom Finegan 2012/10/20 00:57:17 Changed this and the usage above to occur only whe
+ encrypted_buffer.handle,
+ encrypted_buffer.size);
+ }
+
PP_EncryptedBlockInfo block_info;
if (!DeserializeBlockInfo(serialized_block_info, &block_info))
return;
brettw 2012/10/19 23:03:54 If you hit this the plugin_resource will leak
Tom Finegan 2012/10/20 00:57:17 Done. Thanks! This part now happens before we do a
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.cc ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698