Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 106fe7aa authored by Arun Johnson's avatar Arun Johnson
Browse files

Fix race b/w prepareInitialInputBuffers and feedInputBuffersIfAvailable

 After flush, input buffers can be either with codec or
 framework. Bufferchannel was started before prepareInitialInputBuffers,
 which caused input buffer returning through onWorkDone sent to
 client. The was causing a failure during prepare buffers stage.
 With this change, the buferchannel is only started after the
 the preparation is complete.

 For the buffers not yet released by the codec after flush and before
 signalResume, the failure in prepareInitialInputBuffers will be
 recovered immediatly as the bufers are released. So this failure
 is logged and the codec is allowed to contine without errors.

Bug: 245397641

Test: manual per b/237656746#comment19
Test: atest android.media.decoder.cts.AdaptivePlaybackTest
Test: atest android.media.cts.MediaCodecTest


Change-Id: I8051d0b2d74f251964b733a7b7948a9d626c011e
parent 06f98204
Loading
Loading
Loading
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