cuda: fix invalid frame when copy from cuda