CameraHal: Avoid race condition during recording stop

- A race condition is possible when recording is stopped.
  'BaseCameraAdapter::stopVideoCapture()' is clearing
  'mVideoBuffersAvailable'. A delayed video frame from
  'AppCallbackNotifier' can return afterwards though and
  then try to query the already empty 'KeyedVector'. This
  will result in a segfault. Solution is to move the vector
  reset away from 'stopVideoCapture()' and in to
  'startVideoCapture()' where it is needed.

Bug: 7021214

Change-Id: Ic234189b49e35c990b3af70bd713a12cb762362c
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
1 file changed