stagefright: fix error code return
Return OK only if error is ERROR_UNSUPPORTED which means the
infe box is of an unsupported version. Other errors still get
propagated.i
bug: 67652588
Change-Id: I841eb4106f29d792f642dc068f6796dca2ff1c5b
diff --git a/media/extractors/mp4/ItemTable.cpp b/media/extractors/mp4/ItemTable.cpp
index b476c75..fd8bc1a 100644
--- a/media/extractors/mp4/ItemTable.cpp
+++ b/media/extractors/mp4/ItemTable.cpp
@@ -1108,7 +1108,9 @@
mItemInfos->push_back(itemInfo);
mHasGrids |= (itemInfo.itemType == FOURCC('g', 'r', 'i', 'd'));
}
- return OK;
+ // InfeBox parse returns ERROR_UNSUPPORTED if the box if an unsupported
+ // version. Ignore this error as it's not fatal.
+ return (err == ERROR_UNSUPPORTED) ? OK : err;
}
//////////////////////////////////////////////////////////////////