-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[camera] Add protection around DroidMediaCamera pointer in CameraList…
…ener When destroying DroidMediaCamera, CameraListener held inside an ongoing callback can outlive the destroying instance. To prevent it from accessing DroidMediaCamera after being destroyed, one needs to remove the reference to DroidMediaCamera inside the listener before deleting it. As this removal happens in a different thread then callbacks, a mutex is required to prevent race condition. Also, just to be safe, remove the listener from the Android Camera instance as well.
- Loading branch information
1 parent
52143f2
commit a2d02f8
Showing
1 changed file
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters