jetson.utils.videoOutput behaves differently if called from callback

I run two cameras on Jetson Nano with a code based on the detectnet example. I trigger the video on a GPIO pin and start capture using detectEvent. The callback function works fine if called from the main() loop but when called from the callback function only one display shows frames and the other shows just black frame (while the code for the two streams is identical).