Since 1fa05cf4 and 57323dda, flush and release have been made asynchronous and logger object might have been destroyed while we use the mediacodec API, leading to crash.