Fix for decryption unit test break.

Change-Id: I4da3956f25fae2738fac9d0e3a8e8f597836d3a3
This commit is contained in:
Thomas Inskip 2014-09-08 11:43:25 -07:00
parent 7b1640a8f7
commit 1ff36eb217
2 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,8 @@ scoped_ptr<KeySource> KeySource::CreateFromHexStrings(
}
std::vector<uint8> pssh_data;
if (!base::HexStringToBytes(pssh_data_hex, &pssh_data)) {
if (!pssh_data_hex.empty() &&
!base::HexStringToBytes(pssh_data_hex, &pssh_data)) {
LOG(ERROR) << "Cannot parse pssh_hex " << pssh_data_hex;
return scoped_ptr<KeySource>();
}

View File

@ -203,7 +203,7 @@ void PackagerTestBasic::Decrypt(const std::string& input,
Demuxer demuxer(GetFullPath(input));
scoped_ptr<KeySource> decryption_key_source(
KeySource::CreateFromHexStrings(kKeyIdHex, kKeyHex, "", ""));
DCHECK(decryption_key_source);
ASSERT_TRUE(decryption_key_source);
demuxer.SetKeySource(decryption_key_source.Pass());
ASSERT_OK(demuxer.Initialize());