CvCapture* capture = NULL;
capture = cvCreateFileCapture(sFilePathName);
if (!capture)
{
return FALSE;
}
while (frame = cvQueryFrame(capture))
{
cimg.CopyOf(frame);
cimg.DrawToHDC(hDC, &rect);
Sleep(100);
}
cvReleaseCapture(&capture);
第一次使用没有问题,可是第二次就不能用了,调试的时候发现第二次时capture的值变为0了。求解?