summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-07-25 22:37:39 -0500
committertrav90 <travawine@palemoon.org>2018-07-25 22:37:39 -0500
commit512dcfac01d5395855cf2aff96ecd62ededb05aa (patch)
tree61fa7de4a0967506e273daf72e89077ef9d7d85c /dom
parentd2498873e95da2f6624841144dfb015fa5f898d0 (diff)
downloadUXP-512dcfac01d5395855cf2aff96ecd62ededb05aa.tar
UXP-512dcfac01d5395855cf2aff96ecd62ededb05aa.tar.gz
UXP-512dcfac01d5395855cf2aff96ecd62ededb05aa.tar.lz
UXP-512dcfac01d5395855cf2aff96ecd62ededb05aa.tar.xz
UXP-512dcfac01d5395855cf2aff96ecd62ededb05aa.zip
[EME] Add support for sbgp and sgpd boxes in the traf box
Diffstat (limited to 'dom')
-rw-r--r--dom/media/fmp4/MP4Demuxer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/dom/media/fmp4/MP4Demuxer.cpp b/dom/media/fmp4/MP4Demuxer.cpp
index 70b176699..a871d73b9 100644
--- a/dom/media/fmp4/MP4Demuxer.cpp
+++ b/dom/media/fmp4/MP4Demuxer.cpp
@@ -350,7 +350,12 @@ MP4TrackDemuxer::GetNextSample()
nsAutoPtr<MediaRawDataWriter> writer(sample->CreateWriter());
writer->mCrypto.mMode = mInfo->mCrypto.mMode;
writer->mCrypto.mIVSize = mInfo->mCrypto.mIVSize;
- writer->mCrypto.mKeyId.AppendElements(mInfo->mCrypto.mKeyId);
+
+ // The length of the key will be zero if no key was specified in the sample
+ // information, meaning we should fall back to the default key.
+ if (writer->mCrypto.mKeyId.Length() == 0) {
+ writer->mCrypto.mKeyId.AppendElements(mInfo->mCrypto.mKeyId);
+ }
}
return sample.forget();
}