Skip to content
Snippets Groups Projects
Commit ee83f76b authored by Dale Sather's avatar Dale Sather Committed by CQ bot account: commit-bot@chromium.org
Browse files

[mediaplayer] don't panic if the audio render stalls

This CL changes the behavior of the media player when the audio
renderer holds on to packets too long, which generally happens due to
scheduling issues. Because the player has allocated a limited amount
of space for transferring packets between itself and the renderer,
that space can be exhausted if the renderer doesn't retire packets
quickly enough.

The fix is to drop packets instead of panicking. There are a few
paths that had to be fixed to enable this. Sometimes the memory
allocation failures occur in a callback from the audio decoder.
Sometimes audio has to be interleaved after the decoder, and the
allocation failure is detected there. Sometimes (when no decoder
is needed) audio needs to be copied from system memory into vmo
memory, and the failure happens prior to the copy.

Two tests have been added to replicate these failure modes. Those
tests produced panics before the fixes were introduced.

TEST: new CQ tests
Change-Id: I26582d19481c6716f6a4141e6717b68670ea44f1
parent 0b1cef55
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment