Bug 1549544 - Use the 'cenc' init data type when encountering cbcs media. r=cpearce
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 14 May 2019 02:31:47 +0000
changeset 535927 4b635d928b2bd42890ffc97c55622072092351e9
parent 535926 1624c5a319174b9c850b3183a95d8bbefb051f41
child 535928 2265bfc5920d3e510c4edf9b0caf8e3eaf9bdc9c
child 535941 ac87e6ddded678765e2643d86a9ce65512ab9f56
child 536056 3b622e5dea3a9472380cce2d042e7f1bccb8d606
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1549544
milestone68.0a1
first release with
nightly linux32
4b635d928b2b / 68.0a1 / 20190516093926 / files
nightly linux64
4b635d928b2b / 68.0a1 / 20190516093926 / files
nightly mac
4b635d928b2b / 68.0a1 / 20190516093926 / files
nightly win32
4b635d928b2b / 68.0a1 / 20190516093926 / files
nightly win64
4b635d928b2b / 68.0a1 / 20190516093926 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1549544 - Use the 'cenc' init data type when encountering cbcs media. r=cpearce When encountering media using the common encryption format (mp4s containing pssh boxes), the encrypted event we fire should specify the cenc init data type. Fixes a bug where for cbcs the 'cbcs' init data type was used -- which is a bogus value. Differential Revision: https://phabricator.services.mozilla.com/D30095
dom/media/mp4/Index.cpp
--- a/dom/media/mp4/Index.cpp
+++ b/dom/media/mp4/Index.cpp
@@ -137,17 +137,17 @@ already_AddRefed<MediaRawData> SampleIte
     }
     if (moofParser->mSinf.mDefaultEncryptionType == AtomType("cenc")) {
       cryptoScheme = CryptoScheme::Cenc;
       writer->mCrypto.mCryptoScheme = CryptoScheme::Cenc;
       writer->mCrypto.mInitDataType = NS_LITERAL_STRING("cenc");
     } else if (moofParser->mSinf.mDefaultEncryptionType == AtomType("cbcs")) {
       cryptoScheme = CryptoScheme::Cbcs;
       writer->mCrypto.mCryptoScheme = CryptoScheme::Cbcs;
-      writer->mCrypto.mInitDataType = NS_LITERAL_STRING("cbcs");
+      writer->mCrypto.mInitDataType = NS_LITERAL_STRING("cenc");
     } else {
       MOZ_ASSERT_UNREACHABLE(
           "Sample description entry reports sample is encrypted, but no "
           "scheme, or an unsupported shceme is in use!");
       return nullptr;
     }
   }