Should really compare the pos to the total number of values in get() and set() methods in ListTableEntries class

o related-to-bug: 6435176

Change-Id: Ib6f6e598304e7c9becfa6cb3fc925c55b2df2682
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 6cd24e9..5aad99f 100755
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -103,7 +103,7 @@
         // @arg value must be in network byte order
         // @arg pos location the value must be in.
         void set(const TYPE& value, uint32_t pos) {
-            CHECK_LT(pos, mTotalNumTableEntries);
+            CHECK_LT(pos, mTotalNumTableEntries * mEntryCapacity);
 
             typename List<TYPE *>::iterator it = mTableEntryList.begin();
             uint32_t iterations = (pos / (mElementCapacity * mEntryCapacity));
@@ -122,7 +122,7 @@
         // @arg pos location the value must be in.
         // @return true if a value is found.
         bool get(TYPE& value, uint32_t pos) const {
-            if (pos >= mTotalNumTableEntries) {
+            if (pos >= mTotalNumTableEntries * mEntryCapacity) {
                 return false;
             }