VLC reconnects to remote http input too fast, rendering cpu usage to 100%
When using VLC as a video player to restream a remote media, like this:
vlc http://remoteip:port/test.ts --sout '#std{...}'
if a remote source suddenly goes down, for a brief period of time (e.g. network issues) then VLC will detect the broken connection and (if loop option is given) try to reconnect to that stream, but it will do it too fast IMHO. In my case, VLC reconnect so fast that my cpu usage goes to 100% during that time.
The solution would be simply to delay each reconnection attempt with just a single "sleep(500ms)" which would be far enough not to cause the starvation of cpu.