FlacEncoder: handle EOS properly. am: f4db80421f am: 6cf01ff35b am: df0d876e66 am: 17328948bd

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

Change-Id: I0273a875c95bc2d66fda4adcb72a424a01a39ee6