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

Commit 97f4529e authored by wangshijie's avatar wangshijie Committed by Girish Shetty
Browse files

FrameDecoder: handle decoder error and unblock extractInternalUsingBlockModel

This patch enhances FrameDecoder to gracefully handle decoder errors that occur asynchronously.
Specifically, it:

- Adds an onDecoderError() method to set error flags and notify condition variable.
- Updates extractInternalUsingBlockModel() to wait on either normal completion
  (mHandleOutputBufferAsyncDone) or an error (mDecoderError), preventing
  indefinite blocking if the decoder fails.
- Adds internal error state (mDecoderError, mDecoderErrorCode) to
  FrameDecoder for reporting error status when needed.

This improves robustness when decoding fails unexpectedly.

Bug: 435330706
Flag: EXEMPT bugfix
Test: Manually verified frame decoding error paths return proper error code and no longer hang in wait_for().
(cherry picked from https://android-review.googlesource.com/q/commit:87f4f0fd3b102233a88dee7fd8be0ac5444bd6a7)

Change-Id: I7918b42cbec2fdd4bea97de7d9c1f52188504f67
parent 54ecfb12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment