зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1482452 - p1: validate buffer contents before accessing. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D16707 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9c0f60b79c
Коммит
9c28465e35
|
@ -356,10 +356,13 @@ void HLSTrackDemuxer::UpdateMediaInfo(int index) {
|
|||
NS_ConvertUTF16toUTF8(audioInfoObj->MimeType()->ToString());
|
||||
audioInfo->mDuration =
|
||||
TimeUnit::FromMicroseconds(audioInfoObj->Duration());
|
||||
auto&& csd = audioInfoObj->CodecSpecificData()->GetElements();
|
||||
audioInfo->mCodecSpecificConfig->Clear();
|
||||
audioInfo->mCodecSpecificConfig->AppendElements(
|
||||
reinterpret_cast<uint8_t*>(&csd[0]), csd.Length());
|
||||
jni::ByteArray::LocalRef csdBytes = audioInfoObj->CodecSpecificData();
|
||||
if (csdBytes) {
|
||||
auto&& csd = csdBytes->GetElements();
|
||||
audioInfo->mCodecSpecificConfig->Clear();
|
||||
audioInfo->mCodecSpecificConfig->AppendElements(
|
||||
reinterpret_cast<uint8_t*>(&csd[0]), csd.Length());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
infoObj = mParent->mHLSDemuxerWrapper->GetVideoInfo(index);
|
||||
|
|
Загрузка…
Ссылка в новой задаче