fix up! Remove thread for preview callback when stop preview 09/269109/2 accepted/tizen/unified/20220111.123039 submit/tizen/20220110.092727
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 10 Jan 2022 02:40:15 +0000 (11:40 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 10 Jan 2022 03:22:48 +0000 (12:22 +0900)
commit755c1ecf7eb7aaaa147b9e2433f5e72ab7d75eac
tree0cd13151a78910e133f72940ff24d9a63f22137d
parent2bd1ae9ff63999a8016d068cef4ee00a36d82c7a
fix up! Remove thread for preview callback when stop preview

- The thread leak is occurred with below sequence and it causes deadlock after some time.
 1. Process A calls camera_start_preview(). -> create thread for preview callback
 2. Process B calls camera_start_preview().
 3. Process A gets interrupted callback and the state of camera handle is changed to CAMERA_STATE_CREATED.
    Then, process A's preview callback thread is remained, because it is released in camera_stop_preview(),
    but, it's skipped by interrupt.

[Version] 0.4.71
[Issue Type] Bug fix

Change-Id: Ifaafb52ed3e549d3a6203754ec6fa90079893cb5
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-camera.spec
src/camera.c