mirror of
https://github.com/androidx/media.git
synced 2025-05-14 02:59:52 +08:00

The asynchronous MediaCodec adapter queues input buffers in a background thread. If a codec queueuing operation throws an exception, the buffer enqueuer will store it as a pending exception and re-throw it the next time the adapter will attempt to queue another input buffer. The buffer enqueuer's flush() and shutdown() may throw an exception if the pending error is set. This is subject to a race-condition in which the pending error can be set while the adapter is flushing/shutting down the enqueuer, e.g., if an input buffer is still being queued and the codec throws an exception. As a result, the adapter cannot flush or shutdown gracefully. This change makes the buffer enqueuer to ignore any pending error when flushing/shuttinf down so that the adapter can flush/release gracefully even if a queueing error was detected. PiperOrigin-RevId: 409113054
ExoPlayer library
The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.