Bug 1156505 - p2: Null-check sampleTable before use - r=rillian

This commit is contained in:
Gerald Squelart 2015-10-02 16:13:00 +02:00
parent 919f7ea86c
commit 34e4d2e8a9

View File

@ -1479,7 +1479,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 't', 'c', 'o'):
case FOURCC('c', 'o', '6', '4'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1496,7 +1496,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 't', 's', 'c'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1514,7 +1514,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 't', 's', 'z'):
case FOURCC('s', 't', 'z', '2'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1571,7 +1571,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 't', 't', 's'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1588,7 +1588,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('c', 't', 't', 's'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1605,7 +1605,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 't', 's', 's'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1622,7 +1622,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 'a', 'i', 'z'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -1639,7 +1639,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
case FOURCC('s', 'a', 'i', 'o'):
{
if (!mLastTrack) {
if (!mLastTrack || !mLastTrack->sampleTable.get()) {
return ERROR_MALFORMED;
}
status_t err =
@ -4250,7 +4250,7 @@ public:
nsTArray<MediaSource::Indice> MPEG4Source::exportIndex()
{
nsTArray<MediaSource::Indice> index;
if (!mTimescale) {
if (!mTimescale || !mSampleTable.get()) {
return index;
}