- 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
remove the case for level >= 2.  Since level is a bool, this code can never execute.  Also, there are no calls to tidy in the current code with values other than 0 or 1, so it's safe to do.  Also it removes an error message when using clang++
Merge pull request #531 from SteveGilvarry/ffmpeg-stability-fixes

351-Rebase Attempt for ffmpeg stability fixes
Merge pull request #572 from ZoneMinder/buffer_cleanup

remove the case for level >= 2.  Since level is a bool, this code can ne...
Fix a bug when closing RTSP session over TCP
Merge pull request #573 from manupap1/rtsp_fix

Fix a bug when closing RTSP session over TCP