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

Skip to content
Commit f6c9c5bd authored by Wonsik Kim's avatar Wonsik Kim
Browse files

MediaCodec: ensure reply does not get lost

The following operations store mReplyID to wait for a codec event
before replying:

- init, configure, start, flush, stop:
  These operations causes state transitions.
  Defer if mReplyID is set.
  When handling operation complete event, check current state and
  don't reply if the state is not an expected value.

- signalEOS, createInputSurface, setInputSurface:
  These operations do not cause state transitions.
  Defer if mReplyID is set.
  When handling operation complete event, check current state and
  don't reply if the state is not an expected value.

- release:
  Release is special, as we want to release even if we are in the middle
  of handling other operations.
  Reply to current operation to unblock app and start releasing.
  Release complete event is always handled.

Bug: 154678891
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: I08286bffb13150813a1d237e49ab1bbf8f544f32
parent 9900ec1c
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