Loading media/extractors/mp4/ItemTable.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -546,11 +546,11 @@ void ItemReference::apply( continue; } ALOGV("Image item id %d uses thumbnail item id %d", mRefs[i], mItemId); ImageItem &masterImage = itemIdToItemMap.editValueAt(itemIndex); if (!masterImage.thumbnails.empty()) { ImageItem &imageItem = itemIdToItemMap.editValueAt(itemIndex); if (!imageItem.thumbnails.empty()) { ALOGW("already has thumbnails!"); } masterImage.thumbnails.push_back(mItemId); imageItem.thumbnails.push_back(mItemId); } break; } Loading Loading @@ -929,7 +929,7 @@ private: status_t IpcoBox::parse(off64_t offset, size_t size) { ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); // push dummy as the index is 1-based // push a placeholder as the index is 1-based mItemProperties->push_back(new ItemProperty()); return parseChunks(offset, size); } Loading Loading @@ -1614,17 +1614,17 @@ status_t ItemTable::findThumbnailItem(const uint32_t imageIndex, uint32_t *itemI return BAD_VALUE; } uint32_t masterItemIndex = mDisplayables[imageIndex]; uint32_t imageItemIndex = mDisplayables[imageIndex]; const ImageItem &masterImage = mItemIdToItemMap[masterItemIndex]; if (masterImage.thumbnails.empty()) { *itemIndex = masterItemIndex; const ImageItem &imageItem = mItemIdToItemMap[imageItemIndex]; if (imageItem.thumbnails.empty()) { *itemIndex = imageItemIndex; return OK; } ssize_t thumbItemIndex = mItemIdToItemMap.indexOfKey(masterImage.thumbnails[0]); ssize_t thumbItemIndex = mItemIdToItemMap.indexOfKey(imageItem.thumbnails[0]); if (thumbItemIndex < 0) { // Do not return the master image in this case, fail it so that the // Do not return the image item in this case, fail it so that the // thumbnail extraction code knows we really don't have it. return INVALID_OPERATION; } Loading media/extractors/mp4/MPEG4Extractor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1151,7 +1151,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { } else if (chunk_type == FOURCC("moov")) { mInitCheck = OK; return UNKNOWN_ERROR; // Return a dummy error. return UNKNOWN_ERROR; // Return a generic error. } break; } Loading Loading @@ -5820,7 +5820,7 @@ status_t MPEG4Source::parseTrackFragmentRun(off64_t offset, off64_t size) { return -EINVAL; } // apply some sanity (vs strict legality) checks // apply some quick (vs strict legality) checks // static constexpr uint32_t kMaxTrunSampleCount = 10000; if (sampleCount > kMaxTrunSampleCount) { Loading Loading
media/extractors/mp4/ItemTable.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -546,11 +546,11 @@ void ItemReference::apply( continue; } ALOGV("Image item id %d uses thumbnail item id %d", mRefs[i], mItemId); ImageItem &masterImage = itemIdToItemMap.editValueAt(itemIndex); if (!masterImage.thumbnails.empty()) { ImageItem &imageItem = itemIdToItemMap.editValueAt(itemIndex); if (!imageItem.thumbnails.empty()) { ALOGW("already has thumbnails!"); } masterImage.thumbnails.push_back(mItemId); imageItem.thumbnails.push_back(mItemId); } break; } Loading Loading @@ -929,7 +929,7 @@ private: status_t IpcoBox::parse(off64_t offset, size_t size) { ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); // push dummy as the index is 1-based // push a placeholder as the index is 1-based mItemProperties->push_back(new ItemProperty()); return parseChunks(offset, size); } Loading Loading @@ -1614,17 +1614,17 @@ status_t ItemTable::findThumbnailItem(const uint32_t imageIndex, uint32_t *itemI return BAD_VALUE; } uint32_t masterItemIndex = mDisplayables[imageIndex]; uint32_t imageItemIndex = mDisplayables[imageIndex]; const ImageItem &masterImage = mItemIdToItemMap[masterItemIndex]; if (masterImage.thumbnails.empty()) { *itemIndex = masterItemIndex; const ImageItem &imageItem = mItemIdToItemMap[imageItemIndex]; if (imageItem.thumbnails.empty()) { *itemIndex = imageItemIndex; return OK; } ssize_t thumbItemIndex = mItemIdToItemMap.indexOfKey(masterImage.thumbnails[0]); ssize_t thumbItemIndex = mItemIdToItemMap.indexOfKey(imageItem.thumbnails[0]); if (thumbItemIndex < 0) { // Do not return the master image in this case, fail it so that the // Do not return the image item in this case, fail it so that the // thumbnail extraction code knows we really don't have it. return INVALID_OPERATION; } Loading
media/extractors/mp4/MPEG4Extractor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1151,7 +1151,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { } else if (chunk_type == FOURCC("moov")) { mInitCheck = OK; return UNKNOWN_ERROR; // Return a dummy error. return UNKNOWN_ERROR; // Return a generic error. } break; } Loading Loading @@ -5820,7 +5820,7 @@ status_t MPEG4Source::parseTrackFragmentRun(off64_t offset, off64_t size) { return -EINVAL; } // apply some sanity (vs strict legality) checks // apply some quick (vs strict legality) checks // static constexpr uint32_t kMaxTrunSampleCount = 10000; if (sampleCount > kMaxTrunSampleCount) { Loading