mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1093567 - Don't loop forever looking for mp4 tracks. r=ajones.
We were ignoring I/O errors from parseChunk(). We must break instead of returning early so mInitCheck gets set correctly.
This commit is contained in:
parent
f84588fdfb
commit
e959e5f83a
@ -1669,6 +1669,7 @@ MediaCache::NoteSeek(MediaCacheStream* aStream, int64_t aOldOffset)
|
||||
std::min<int64_t>((aOldOffset + BLOCK_SIZE - 1)/BLOCK_SIZE,
|
||||
aStream->mBlocks.Length());
|
||||
while (blockIndex < endIndex) {
|
||||
MOZ_ASSERT(endIndex > 0);
|
||||
int32_t cacheBlockIndex = aStream->mBlocks[endIndex - 1];
|
||||
if (cacheBlockIndex >= 0) {
|
||||
BlockOwner* bo = GetBlockOwner(cacheBlockIndex, aStream);
|
||||
|
@ -464,6 +464,14 @@ status_t MPEG4Extractor::readMetaData() {
|
||||
status_t err;
|
||||
while (!mFirstTrack) {
|
||||
err = parseChunk(&offset, 0);
|
||||
// The parseChunk function returns UNKNOWN_ERROR to skip
|
||||
// some boxes we don't want to handle. Filter that error
|
||||
// code but return others so e.g. I/O errors propagate.
|
||||
if (err != OK && err != (status_t) UNKNOWN_ERROR) {
|
||||
ALOGW("Error %d parsing chuck at offset %lld looking for first track",
|
||||
err, (long long)offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mInitCheck == OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user