如果3gp或者mp4文件的duration长度为0,则会在SampleIterator::seekTo函数返回错误码-1007,即ERROR_MALFORMED错误。
if (mTable->mSampleToChunkOffset < 0
|| mTable->mChunkOffsetOffset < 0}
调用关系为:
1. MPEG4Extractor类的read函数调用SampleTable类的getMetaDataForSample函数,
status_t err =
mSampleTable->getMetaDataForSample(
mCurrentSampleIndex, &offset, &size, &dts, &isSyncSample);
2.SampleTable类的getMetaDataForSample函数调用SampleIterator类的seekTo函数
status_t err;
if ((err = mSampleIterator->seekTo(sampleIndex)) != OK) {
return err;
}
3.SampleIterator类的seekTo函数返回ERROR_MALFORMED错误
if (mTable->mSampleToChunkOffset < 0
|| mTable->mChunkOffsetOffset < 0}