mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1127554 - Do a fallible allocation in SampleIterator::GetNext. v1 r=mattwoodrow
This commit is contained in:
parent
ced4bbc434
commit
2cd7434422
@ -100,7 +100,10 @@ MP4Sample* SampleIterator::GetNext()
|
||||
sample->size = s->mByteRange.Length();
|
||||
|
||||
// Do the blocking read
|
||||
sample->data = sample->extra_buffer = new uint8_t[sample->size];
|
||||
sample->data = sample->extra_buffer = new (fallible) uint8_t[sample->size];
|
||||
if (!sample->data) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t bytesRead;
|
||||
if (!mIndex->mSource->ReadAt(sample->byte_offset, sample->data, sample->size,
|
||||
|
Loading…
Reference in New Issue
Block a user