mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

The DebugMediaCodecVideoRenderer expects the MediaCodec to return an output format change after the MediaCodecRenderer detects an input format change, but the DebugMediaCodecVideoRenderer resets its state after flushing MediaCodec. This does not cover the following case: an input format change is detected when queueing sample with timestamp X and before the respective output buffer is dequeued, the player seeks back to X. After seeking back to X, the MCR does not trigger an input format change for X again, and MediaCodec (correctly) returns an output format change before dequeueing output X. This commit is changing DebugMediaCodecVideoRenderer to keep expecting an output format change after a flush, is one a format pending output. Such an an edge-case is addressed already in MediaCodecRenderer. PiperOrigin-RevId: 370482506