RGB Stream shows Black but Sometimes works


I’m having a weird problem with my Orbbec Astra Pro.The problem is that the RGB stream Shows black but sometimes it works.This problem started recently and earlier it was working fine.I use it With Python and OpenCV .It works fine when i use it as webcam in the browser.Please Help.

Thank You

Update: The camera works completely fine in a fresh installation of windows in Virtualbox.So i guess theres something that is interfering with the camera