Fix potential threading bug with snapshot_video()