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

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

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