title: Opencv set timeout to videocapture
body: <p>I've set up an ipcam with mjpg stream (with motion on a RPI B+). The stream freezes often, which stops the OCV c++ program processing it. How could I set a timeout, so when the stream is frozen I get some error massage. I'm sure it can be done by classic c++ timeout functions or multi threading, but I'm wondering if there's an easier solution, maybe even built into OpenCV ?
  Using Ubuntu 14.04, OpenCV 2.4.8</p>