getframe = AVIStreamGetFrameOpen( avistream, &bmihdr ) failed

asked 2018-03-05 10:10:21 -0600

Hi, I'm reading a file from this way. I'm using open cv 3.4.1 and I don't succeed to read Frame . Each I try to used AVIStreamGetFrameOpen( avistream, &bmihdr ) . I have a exception :

" Exception thrown at 0x000000007F8411A9 (lvcod64.dll) in ConsoleApplication1.exe: 0xC0000005: Access violation writing location 0x00000000A537AA98. "

Is someone may help to fix it ...

regads

void stream(std::string strCamera) {

cv::VideoCapture cap(strCamera);
while (true)
{
    if (cap.isOpened())
    {
        cv::Mat frame;
        cap >> frame;

        if (!frame.empty())
        {
            cv::imshow("CV_Image", frame);
        }
    }
    cv::waitKey(1);
}

}

int main(int argc, char* argv[]) { thread cam1(stream, "d:\film.avi");

cam1.join();
//  cam2.join();
return 0;

}

edit retag flag offensive close merge delete

Comments

hehe fun multi with ple threads --- schadenfreude at its best ;)

berak gravatar imageberak ( 2018-03-05 11:37:13 -0600 )edit