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

Skip to content
Commit 375525ff authored by Avichal Rakesh's avatar Avichal Rakesh
Browse files

Make ImageWriter thread safe

The various functions in ImageWriter were not protected by a lock, which
led to segfaults under certain race conditions.

This CL adds a mutex to prevent ImageWriter methods from executing while
ImageWriter is closing. This also prevent multiple calls to close from
executing simultaneously.

It also adds a simialar mutex to WriterImageSurface to prevent
simultaneous calls to close().

Bug: 244262872
Test: mediaframeworktest:com.android.mediaframeworktest.stress
Change-Id: I44976e5a36154ce98f64e2982865b2defcec7f5e
parent 261247f6
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