- Timeout when opening stream after 10 seconds
Sometimes when restarting the camera ffmpeg hung itself in some state, when calling avformat_open_input, which seemed to last forever.
- Reopen stream if av_read_frame returns EOF
Sometimes ffmpeg starts returning an EOF error when calling av_read_frame. Once this happens it seems no more images will ever be captured.
- Reopen stream if av_read_frame returns -110
Means something like Connection failed; cant remember. Anyway. Once this happens it seems no more images will ever be captured.
Use value from options (FFMPEG_OPEN_TIMEOUT) as timeout when calling av_open_input_file.
removed use of av_err2str. someone could not compile when using that macro.