diff options
author | jrummell <jrummell@chromium.org> | 2015-04-27 16:53:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-27 23:53:35 +0000 |
commit | 95e07abe0d0073060d169d4b3e6de8f63b68653c (patch) | |
tree | e7e0426145dec5ee6e577875bd7dd7645b0c0139 /media | |
parent | 2e3b5c8ccaf50206788f433f74af67a4e153230a (diff) | |
download | chromium_src-95e07abe0d0073060d169d4b3e6de8f63b68653c.zip chromium_src-95e07abe0d0073060d169d4b3e6de8f63b68653c.tar.gz chromium_src-95e07abe0d0073060d169d4b3e6de8f63b68653c.tar.bz2 |
Handle all possible cdm::Status values before passing through Pepper
BUG=471322
TEST=EME tests pass
Review URL: https://codereview.chromium.org/1050823009
Cr-Commit-Position: refs/heads/master@{#327181}
Diffstat (limited to 'media')
-rw-r--r-- | media/cdm/ppapi/cdm_adapter.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/media/cdm/ppapi/cdm_adapter.cc b/media/cdm/ppapi/cdm_adapter.cc index 1d765d0..636ea32 100644 --- a/media/cdm/ppapi/cdm_adapter.cc +++ b/media/cdm/ppapi/cdm_adapter.cc @@ -105,10 +105,16 @@ PP_DecryptResult CdmStatusToPpDecryptResult(cdm::Status status) { return PP_DECRYPTRESULT_DECRYPT_ERROR; case cdm::kDecodeError: return PP_DECRYPTRESULT_DECODE_ERROR; - default: - PP_NOTREACHED(); - return PP_DECRYPTRESULT_DECODE_ERROR; + case cdm::kSessionError: + case cdm::kDeferredInitialization: + // kSessionError and kDeferredInitialization are only used by the + // Initialize* methods internally and never returned. Deliver* + // methods should never use these values. + break; } + + PP_NOTREACHED(); + return PP_DECRYPTRESULT_DECRYPT_ERROR; } PP_DecryptedFrameFormat CdmVideoFormatToPpDecryptedFrameFormat( |