Error when running a simple program
Hey there, After writing this simple program that displays a video.
include <opencv/highgui.h>
int main( int argc, char** argv ) {
cvNamedWindow("Example2", CV_WINDOW_AUTOSIZE);
CvCapture *capture = cvCreateFileCapture(argv[1]);
IplImage *frame;
while(1){
frame = cvQueryFrame(capture);
if (!frame) break;
cvShowImage("Example2" , frame);
cvReleaseCapture(&capture);
cvDestroyWindow("Example2");
}
}
I compiled it and run it without any errors. But at the second time I tried to run it again (Also compiled it with no errors), I got this error message:
linking pad video/x-raw-yuv
sink is already linked
Thanks in advance :)