CCodec: Duplicate format given to CCodecBufferChannel
CCodec gives mOutputFormat to CCodecBufferChannel::onWorkDone() while also holding it in itself. CCodec may later modify mOutputFormat which affects the format that has been given to CCodecBufferChannel. This breaks the assumption in CCodecBufferChannel that it is the sole owner of the format object until it is given back in onOutputBufferAvailable(), hence it is a bug that causes a race condition. This CL makes CCodec give a duplicated format object to CCodecBufferChannel instead of the original object that CCodec holds. Test: atest \ android.hardware.camera2.cts.\ RecordingTest#testIntermediateSurfaceRecording (Repeat multiple times) Bug: 159662169 Change-Id: I59b747f7381728964bf3439ac3213fac24de0e1d
Loading
Please register or sign in to comment