author | Margareta Eliza Balazs <ebalazs@mozilla.com> |
Thu, 12 Apr 2018 16:30:43 +0300 | |
changeset 412977 | 969deb7a468c6b68fdf921a2e16a8a5302417e1e |
parent 412976 | 2198e282bdcf9cee653dfa3e4fd365444b4ef60a |
child 412978 | c0900d55df7b194d48fa1050dc7feedd1d159498 |
push id | 33828 |
push user | archaeopteryx@coole-files.de |
push date | Thu, 12 Apr 2018 19:19:41 +0000 |
treeherder | mozilla-central@6e22c4a726c2 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1451681 |
milestone | 61.0a1 |
backs out | 2198e282bdcf9cee653dfa3e4fd365444b4ef60a |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
dom/media/mp4/Index.cpp | file | annotate | diff | comparison | revisions | |
dom/media/platforms/agnostic/bytestreams/AnnexB.cpp | file | annotate | diff | comparison | revisions |
--- a/dom/media/mp4/Index.cpp +++ b/dom/media/mp4/Index.cpp @@ -161,17 +161,17 @@ already_AddRefed<MediaRawData> SampleIte writer->mCrypto.mKeyId.AppendElements(sampleInfo->mKeyId); } if (!reader.ReadArray(writer->mCrypto.mIV, ivSize)) { return nullptr; } auto res = reader.ReadU16(); - if (res.isOk() && res.unwrap() > 0) { + if (res.isOk()) { uint16_t count = res.unwrap(); if (reader.Remaining() < count * 6) { return nullptr; } for (size_t i = 0; i < count; i++) { auto res_16 = reader.ReadU16();
--- a/dom/media/platforms/agnostic/bytestreams/AnnexB.cpp +++ b/dom/media/platforms/agnostic/bytestreams/AnnexB.cpp @@ -69,23 +69,18 @@ AnnexB::ConvertSampleToAnnexB(mozilla::M return Err(NS_ERROR_OUT_OF_MEMORY); } // Prepending the NAL with SPS/PPS will mess up the encryption subsample // offsets. So we need to account for the extra bytes by increasing // the length of the first clear data subsample. Otherwise decryption // will fail. if (aSample->mCrypto.mValid) { - if (aSample->mCrypto.mPlainSizes.Length() == 0) { - samplewriter->mCrypto.mPlainSizes.AppendElement(annexB->Length()); - samplewriter->mCrypto.mEncryptedSizes.AppendElement( - samplewriter->Size() - annexB->Length()); - } else { - samplewriterwriter->mCrypto.mPlainSizes[0] += annexB->Length(); - } + MOZ_ASSERT(samplewriter->mCrypto.mPlainSizes.Length() > 0); + samplewriter->mCrypto.mPlainSizes[0] += annexB->Length(); } } return Ok(); } already_AddRefed<mozilla::MediaByteBuffer> AnnexB::ConvertExtraDataToAnnexB(const mozilla::MediaByteBuffer* aExtraData)