summaryrefslogtreecommitdiff
path: root/test/camera/configuration_set.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-05-21 17:49:20 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-05-24 15:06:05 +0300
commit7de2daf653bc7fd68950245f42603b76ef2b355c (patch)
tree816817060650bf3ba4367f179136ac9a8281c33e /test/camera/configuration_set.cpp
parente8924f30f7186a9523b8850976f01d27713e397c (diff)
android: camera_worker: Process all queued requests when stopping
When stopping the camera worker, queuedRequest() calls may have queued asynchronous function invocation messages to the worker thread, and some of those messages may not have been processed yet. The messages will stay in the thread's queue until the camera worker is restarted (when the camera service will start a new capture session). At that point, they will be dispatched, which will cause a crash due to the CaptureRequest passed to processRequest() having been deleted by CameraDevice::stop() calling descriptors_.clear(). Fix this by forcing dispatching of all function invocation messages when stopping the camera worker thread. Note that this is inherently racy, as more queueRequest() calls may arrive from the camera service while we're stopping. This race condition will be addressed by a subsequent patch series. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/camera/configuration_set.cpp')
0 files changed, 0 insertions, 0 deletions