# Is running data streams of a multispectral camera in threads thread safe?

**URL:** <https://forum.commonvisionblox.com/t/is-running-data-streams-of-a-multispectral-camera-in-threads-thread-safe/1741>\
**Category:** Programming Questions\
**Tags:** cpp, acquisition, gigevision\
**Created:** [July 4, 2022, 3:58pm UTC](https://forum.commonvisionblox.com/t/is-running-data-streams-of-a-multispectral-camera-in-threads-thread-safe/1741 "2022-07-04T15:58:21Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![keerthitheja](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@keerthitheja](https://forum.commonvisionblox.com/u/keerthitheja)\
**Post date:** [July 11, 2022, 1:31pm UTC](https://forum.commonvisionblox.com/t/is-running-data-streams-of-a-multispectral-camera-in-threads-thread-safe/1741/7 "2022-07-11T13:31:25Z")

</div>

Hi @Andreas  
Thank you for the reply. so the issue I had highlighted here below was seen with the version 13.04.006 of CVB.

> [@keerthitheja](#):
>
> So, I tried to dump the crash using exception, the program mostly crashes at Stream-\>Wait(). The exception it gives me always is the **` composite is not an image`**. This exception mostly occurs only for the NIR stream.

I am having difficulty in setting the pixel format for each stream individually using CVB++.

Setting the pixel format is via the CVB device nodemap and with this, I can either set it to RGB8 or Mono before I start the streams.

Is it possible to set the pixel format for each stream individually ?  
For more understanding of my problem, please refer to the below thread

[https://forum.commonvisionblox.com/t/modifying-individual-pixelformat-settings-for-dual-streams-of-a-multispectral-camera/1696?u=keerthitheja](https://forum.commonvisionblox.com/t/modifying-individual-pixelformat-settings-for-dual-streams-of-a-multispectral-camera/1696)

---

_[View the full topic](https://forum.commonvisionblox.com/t/is-running-data-streams-of-a-multispectral-camera-in-threads-thread-safe/1741)._
