diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 20:49:20 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 20:49:20 +0000 |
commit | 8f5a9a5c300c46c7f54f6b9b89894e71f3bea324 (patch) | |
tree | 3393ba4c924fd4e254df3fb66ffa0f551a2a4e43 /webkit/media/crypto/ppapi/clear_key_cdm.cc | |
parent | 2789ef864c34809072799238e0af41c5ea9783fb (diff) | |
download | chromium_src-8f5a9a5c300c46c7f54f6b9b89894e71f3bea324.zip chromium_src-8f5a9a5c300c46c7f54f6b9b89894e71f3bea324.tar.gz chromium_src-8f5a9a5c300c46c7f54f6b9b89894e71f3bea324.tar.bz2 |
Encrypted Media: Return and handle NeedMoreData correctly.
Also did some clean-up:
- Removed PP_DECRYPTEDFRAMEFORMAT_EMPTY.
- Returns kAborted for AudioDecoder::Reset().
- Added helper function to make return type conversion.
BUG=156425
TEST=media_unittests, clearkey CDM decrypt-and-decode with fake video decoder
Review URL: https://chromiumcodereview.appspot.com/11234019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media/crypto/ppapi/clear_key_cdm.cc')
-rw-r--r-- | webkit/media/crypto/ppapi/clear_key_cdm.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc index 53ba112..ced22e4 100644 --- a/webkit/media/crypto/ppapi/clear_key_cdm.cc +++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc @@ -309,10 +309,9 @@ void ClearKeyCdm::DeinitializeDecoder(cdm::StreamType decoder_type) { cdm::Status ClearKeyCdm::DecryptAndDecodeFrame( const cdm::InputBuffer& encrypted_buffer, cdm::VideoFrame* decoded_frame) { - if (!encrypted_buffer.data) { - decoded_frame->set_format(cdm::kEmptyVideoFrame); - return cdm::kSuccess; - } + // TODO(xhwang): Need to flush the video decoder with empty buffer. + if (!encrypted_buffer.data) + return cdm::kNeedMoreData; scoped_refptr<media::DecoderBuffer> decoder_buffer = CopyDecoderBufferFrom(encrypted_buffer); |