Camera2: Copy metadata buffers for streaming.
Using the passed-in buffer directly is incorrect; copy them so that
concurrent access can be controlled, and ownership is clear.
Bug: 6243944
Change-Id: Iad22c0dc166b7739e6c5dbfa39aac631b974c95a
diff --git a/services/camera/libcameraservice/Camera2Device.h b/services/camera/libcameraservice/Camera2Device.h
index e8a68d3..2da3ade 100644
--- a/services/camera/libcameraservice/Camera2Device.h
+++ b/services/camera/libcameraservice/Camera2Device.h
@@ -87,7 +87,8 @@
// Set repeating buffer(s); if the queue is empty on a dequeue call, the
// queue copies the contents of the stream slot into the queue, and then
- // dequeues the first new entry.
+ // dequeues the first new entry. The metadata buffers passed in are
+ // copied.
status_t setStreamSlot(camera_metadata_t *buf);
status_t setStreamSlot(const List<camera_metadata_t*> &bufs);