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 a5fccd2859bba4b47fb9a2e8c0c6822313516e16..4afd8fc8a50e3f0c61741f78317a1381531c0124 100644 |
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc |
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc |
@@ -500,7 +500,7 @@ void PPP_ContentDecryptor_Private_Proxy::OnMsgInitializeVideoDecoder( |
if (ppp_decryptor_impl_) { |
PP_Resource plugin_resource = 0; |
- if (extra_data_buffer.size > 0) { |
+ if (extra_data_buffer.resource.host_resource() != 0) { |
plugin_resource = |
PPB_Buffer_Proxy::AddProxyResource(extra_data_buffer.resource, |
extra_data_buffer.handle, |
@@ -547,13 +547,18 @@ 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_EncryptedBlockInfo block_info; |
if (!DeserializeBlockInfo(serialized_block_info, &block_info)) |
return; |
+ |
+ PP_Resource plugin_resource = 0; |
+ if (encrypted_buffer.resource.host_resource() != 0) { |
+ plugin_resource = |
+ PPB_Buffer_Proxy::AddProxyResource(encrypted_buffer.resource, |
+ encrypted_buffer.handle, |
+ encrypted_buffer.size); |
+ } |
+ |
CallWhileUnlocked( |
ppp_decryptor_impl_->DecryptAndDecode, |
instance, |