commit | d4e2476df5136d7f0b42c99225453b24725d64a3 | [log] [tgz] |
---|---|---|
author | Changyeon Jo <changyeon@google.com> | Fri Feb 28 11:15:29 2020 -0800 |
committer | Changyeon Jo <changyeon@google.com> | Fri Feb 28 15:18:51 2020 -0800 |
tree | 89afc4fe99dec807d7599c7a81748a9982c346c6 | |
parent | f73eb94d94cf94dc028b8af71871349bb180ae34 [diff] |
Fix multi-thread issues in StreamHandler In current design, it is possible that the client stops a video stream before the last analyze thread is scheduled. Because stopping a video stream sets an analyzer callback as null, the analyze thread will therefore be crashed as soon as it is scheduled. To prevent this, this change adds a mutex to protect shared variables and adds a nullcheck in a analyze thread. Fix: 150255890 Test: m -j libevssupport and run face enrollment w/ user switching Change-Id: I161be8d69f8116846f3863a6e60e491ccf1af2ca
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.