CvCapture* capture = cvCreateFileCapture( filename );
int nFrames = (int) cvGetCaptureProperty( capture , CV_CAP_PROP_FRAME_COUNT );
printf("Frame count - %d\n", nFrames);
while(1){
frame = cvQueryFrame( capture );
if( !frame ) {
break;
}
}
nFrames == 101 但循环在 101 次迭代后不会停止,为什么?