Fix coverity issue - CID
1789471 - Waiting while holding the lock by unlocking
just after the completion of _capture_event.wait_for().
Change-Id: Ia2cb4f9878f57c030273a62d2aadaf30d38e70fe
Signed-off-by: Inki Dae <inki.dae@samsung.com>
static void captureCompletedCb(void *user_data);
static bool previewFpsCb(camera_attr_fps_e fps, void *user_data);
static bool compareSizesDescending(const cv::Size &a, const cv::Size &b);
- std::mutex &getMutex() { return _capture_mutex; }
+ std::mutex &getMutex()
+ {
+ return _capture_mutex;
+ }
public:
CameraApiBackend();
if (!event_ret)
throw InvalidOperation("Camera device not working");
+ lock.unlock();
+
auto &image_data = dynamic_cast<ImageDataType &>(out_data);
image_data.width = _cvCaptureImage.cols;