> I am using two different mutex variable

That's likely to be the problem. All you're doing by using two mutex variables is preventing thread1 from interfering with itself (which it won't do anyway even without a mutex) and likewise for thread2. To stop thread1 and thread2 interfering with each other you need to use the SAME mutex flag.

> What is the shortfall if 4136 is used
None if 4136 is exactly equal to sizeof(CaptureBuffer). If it isn't and the problem is that you get odd behaviour, it could be that you're getting UB due to corrupted memory. Remember, you didn't say what the actual problem was, you just posted partial code and said "check the flow", so if I failed to guess the problem correctly then I guess my mind reading skills aren't up to your expectations.

Despite me asking, you still haven't said what the actual problem is. Is there one? What are you observing that you didn't expect?