Skip to content

Commit

Permalink
Fire KeyError in CdmWrapper if the CDM instance cannot be created.
Browse files Browse the repository at this point in the history
Even with the KeyError fired when CDM instance creation failed, the application could ignore the KeyError and still calls AddKey. The media pipeline also has no idea about this failure and could call Decrypt/Decode functions. Added check on |cdm_| to prevent crash in these cases.

Also did some clean-up in cdm_wrapper.cc:
1, Inline accessor/getter definitions.
2, Reorder calsses to group similar classes together.
3, Replace reinterpret_cast<T*>(void*) with static_cast.

BUG=none
TEST=encrypted file still plays :)


Review URL: https://chromiumcodereview.appspot.com/11270043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164397 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
xhwang@chromium.org committed Oct 26, 2012
1 parent 1cf5550 commit 3b274b4
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 236 deletions.
Loading

0 comments on commit 3b274b4

Please sign in to comment.