- 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.
Process should exit if ReopenFfmpeg function fails to create a worker thread.
Define AV_ERROR_MAX_STRING_SIZE to 64 if it is not already defined.
Define AV_ERROR_MAX_STRING_SIZE after all include files to use ffmpeg define if it exists.
- join reconnect thread when finished to clean up thread resources.
- don't spawn a new thread for every attempt to open a stream while reconnecting.
Put opts back in
Merge pull request #531 from SteveGilvarry/ffmpeg-stability-fixes

351-Rebase Attempt for ffmpeg stability fixes