aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Hu <bohu@google.com>2023-12-04 21:42:12 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-12-04 21:42:12 +0000
commit0300e85e95ee84f50bee8a30c4f01202bdf0c954 (patch)
tree7ed259f9390ffcd7d3b560edaf4a090d5227e661
parent2686b940011c1ed6155e2caff480608531c8fbac (diff)
parentcc02116553ece685d5236626699c15a6edd04d7a (diff)
downloadgoldfish-opengl-0300e85e95ee84f50bee8a30c4f01202bdf0c954.tar.gz
hevc decoder: avoid access iterator after erase from map am: 1c89a33efb am: a333f9216c am: 7abc6bb628 am: cc02116553
Original change: https://googleplex-android-review.googlesource.com/c/device/generic/goldfish-opengl/+/25532478 Change-Id: I1ec8ec891fc1580aaf495b8d76979627001ebe9c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp b/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp
index 14eed1f6..173dd386 100644
--- a/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp
+++ b/system/codecs/c2/decoders/hevcdec/C2GoldfishHevcDec.cpp
@@ -816,15 +816,15 @@ void C2GoldfishHevcDec::removePts(uint64_t pts) {
if (!mOldPts2Index.empty()) {
auto iter = mOldPts2Index.find(pts);
if (iter != mOldPts2Index.end()) {
- mOldPts2Index.erase(iter);
index = iter->second;
+ mOldPts2Index.erase(iter);
found = true;
}
} else {
auto iter = mPts2Index.find(pts);
if (iter != mPts2Index.end()) {
- mPts2Index.erase(iter);
index = iter->second;
+ mPts2Index.erase(iter);
found = true;
}
}