avcenc: Add bitstream overflow check during emulation prevention am: 10910bf910 am: 51373e847b am: 08e74b410b

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/libavc/+/13932334

Change-Id: I4877c869578404d15754ab1923a273d848592443