Skip to content

Commit

Permalink
Merge pull request #332 from WebPlatformForEmbedded/pstanek/mem-api-e…
Browse files Browse the repository at this point in the history
…rror/1

[OCDM][ADAPTER] Do not pass invalid token to additional calls
  • Loading branch information
pawel-stanek-ml authored Feb 6, 2020
2 parents 4c5dd11 + 77d5c84 commit 4552892
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/ocdm/adapter/broadcom-svp/open_cdm_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,15 @@ OpenCDMError opencdm_gstreamer_session_decrypt(struct OpenCDMSession* session, G
block = NEXUS_MemoryBlock_Clone (reinterpret_cast<NEXUS_MemoryBlockTokenHandle>(*tokenHandle));
if (!block) {
TRACE_L1("Memory token alloc error");
::free(encryptedData);
goto exit;
}
::free(encryptedData);
void *opaqueData;
NEXUS_MemoryBlock_Lock(block, &opaqueData);
if (!opaqueData) {
TRACE_L1("Memory token alloc error");
goto exit;
}

svpMeta->u.u3.secbuf_ptr = reinterpret_cast<uintptr_t>(opaqueData);
Expand Down

0 comments on commit 4552892

Please sign in to comment.