Merge "Instead of asserting return a runtime error if the maximum sample size cannot be determined." into gingerbread
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index ba90407..4bbc251 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -872,7 +872,11 @@
}
size_t max_size;
- CHECK_EQ(mLastTrack->sampleTable->getMaxSampleSize(&max_size), OK);
+ err = mLastTrack->sampleTable->getMaxSampleSize(&max_size);
+
+ if (err != OK) {
+ return err;
+ }
// Assume that a given buffer only contains at most 10 fragments,
// each fragment originally prefixed with a 2 byte length will