Avoid read out of bounds am: 9d33304ec7 am: e2a8a1e317 am: 726b9eb55c am: 0fc277dbb3 am: b2c01cbbc6 am: a8ab3184ff

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/18492389

Change-Id: Ia4eae3cd8f4f1f66b98a0f642bc0bf71d650b2c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>