Skip to content

Commit

Permalink
Replace iv().empty() to is_encrypted().
Browse files Browse the repository at this point in the history
It makes better readability.

Review-Url: https://codereview.chromium.org/2489503002
Cr-Commit-Position: refs/heads/master@{#431217}
  • Loading branch information
SanggiHong authored and Commit bot committed Nov 10, 2016
1 parent 1018bb7 commit 32c39cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ Saikrishna Arcot <saiarcot895@gmail.com>
Salvatore Iovene <salvatore.iovene@intel.com>
Sam Larison <qufighter@gmail.com>
Sam McDonald <sam@sammcd.com>
Sanggi Hong <sanggi.hong11@gmail.com>
Sanghee Lee <sanghee.lee1992@gmail.com>
Sanghyun Park <sh919.park@samsung.com>
Sanghyup Lee <sh53.lee@samsung.com>
Expand Down
3 changes: 1 addition & 2 deletions media/cdm/aes_decryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,7 @@ void AesDecryptor::Decrypt(StreamType stream_type,
CHECK(encrypted->decrypt_config());

scoped_refptr<DecoderBuffer> decrypted;
// An empty iv string signals that the frame is unencrypted.
if (encrypted->decrypt_config()->iv().empty()) {
if (!encrypted->decrypt_config()->is_encrypted()) {
decrypted = DecoderBuffer::CopyFrom(encrypted->data(),
encrypted->data_size());
} else {
Expand Down
3 changes: 1 addition & 2 deletions media/filters/decrypting_demuxer_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ void DecryptingDemuxerStream::DecryptBuffer(
}

DCHECK(buffer->decrypt_config());
// An empty iv string signals that the frame is unencrypted.
if (buffer->decrypt_config()->iv().empty()) {
if (!buffer->decrypt_config()->is_encrypted()) {
DVLOG(2) << "DoDecryptBuffer() - clear buffer.";
scoped_refptr<DecoderBuffer> decrypted = DecoderBuffer::CopyFrom(
buffer->data(), buffer->data_size());
Expand Down

0 comments on commit 32c39cf

Please sign in to comment.