Stop suppressing exceptions in `MediaCodec.Callback` during flush
Previously `AsynchronousMediaCodecCallback.mediaCodecException` was cleared when flushing completed. This behaviour was changed in https://github.com/google/ExoPlayer/commit/aeff51c50772a82e44045e7d80e8a13390e2bb36 so now the exception is not cleared. The result after that commit was that we would **only** suppress/ignore the expression if a flush was currently pending, and we would throw it both before and after the flush. This doesn't really make sense, so this commit changes the behaviour to also throw the exception during the flush. This commit also corrects the assertion in `flush_withPendingError_resetsError` and deflakes it so that it consistently passes. The previous version of this test, although the assertion was incorrect, would often pass because the `dequeueInputBuffer` call would happen while the `flush` was still pending, so the exception was suppressed. #minor-release PiperOrigin-RevId: 540237228 (cherry picked from commit dd17e73629930628e5cb313301ceabf0c776bd18)
Showing
with
87 additions
and
8 deletions
Please
register
or
sign in
to comment