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