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

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: Comments addressed. 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 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,
« 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