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

Skip to content
Commit d12500ad authored by Pawin Vongmasa's avatar Pawin Vongmasa
Browse files

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
parent ae87d21c
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