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
Loading
Please register or sign in to comment