A segmentation fault sometimes occurs when the function cvCreateFileCapture is invoked on network URL

asked 2014-04-14 15:50:09 -0500

enzom83 gravatar image

updated 2014-04-14 15:54:43 -0500

A segmentation fault occurs when the function cvCreateFileCapture is sometimes invoked using a network URL as argument, for esample: rtsp://IPaddress:Port/Path...

int main(int argc, char *argv[])
    QApplication a(argc, argv);


    CvCapture* capture = cvCreateFileCapture("rtsp://...");


    return a.exec();

No error occur if the argument is a file on disk.

I build the source code in debug mode and I when the segmentation fault has occurred, the following stack trace is listed:

CvCapture_GStreamer::open(int, char const*)
cvCreateCapture_GStreamer(int, char const*)

If I create a Plain C++ Project, the call to the function cvCreateFileCapture always results in a segmentation fault. If, instead, I create a Qt Gui Application project, the segmentation fault occurs randomly.

Could the error be caused by the library gstreamer (see the above stack trace)?

edit retag flag offensive close merge delete