summaryrefslogtreecommitdiffstats
path: root/dom/media
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-07-27 15:12:09 +0200
committerGitHub <noreply@github.com>2018-07-27 15:12:09 +0200
commit09eda489bc52ff2c292a66e0fcddf63195c0eda6 (patch)
tree11b003cda285b4df565480c47d8a2a1a3fead5ab /dom/media
parent1afcbb90ee170827feb492dc08b54f874a499904 (diff)
parentb7143013045c9a37e33de59b6646301af17427c4 (diff)
downloadUXP-09eda489bc52ff2c292a66e0fcddf63195c0eda6.tar
UXP-09eda489bc52ff2c292a66e0fcddf63195c0eda6.tar.gz
UXP-09eda489bc52ff2c292a66e0fcddf63195c0eda6.tar.lz
UXP-09eda489bc52ff2c292a66e0fcddf63195c0eda6.tar.xz
UXP-09eda489bc52ff2c292a66e0fcddf63195c0eda6.zip
Merge pull request #678 from trav90/media-work
[EME] Add support for sbgp and sgpd boxes
Diffstat (limited to 'dom/media')
-rw-r--r--dom/media/fmp4/MP4Demuxer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp
index 70b176699..646897468 100644
--- a/dom/media/fmp4/MP4Demuxer.cpp
+++ b/dom/media/fmp4/MP4Demuxer.cpp
@@ -349,8 +349,13 @@ MP4TrackDemuxer::GetNextSample()
if (sample->mCrypto.mValid) {
nsAutoPtr<MediaRawDataWriter> writer(sample->CreateWriter());
writer->mCrypto.mMode = mInfo->mCrypto.mMode;
- writer->mCrypto.mIVSize = mInfo->mCrypto.mIVSize;
- writer->mCrypto.mKeyId.AppendElements(mInfo->mCrypto.mKeyId);
+
+ // Only use the default key parsed from the moov if we haven't already got
+ // one from the sample group description.
+ if (writer->mCrypto.mKeyId.Length() == 0) {
+ writer->mCrypto.mIVSize = mInfo->mCrypto.mIVSize;
+ writer->mCrypto.mKeyId.AppendElements(mInfo->mCrypto.mKeyId);
+ }
}
return sample.forget();
}