cuda: clear the frame queue on flush
cuda: code style