• wm4's avatar
    http: block while waiting for reconnecting · 8a108bde
    wm4 authored
    It makes no sense to return an error after the first reconnect, and then
    somehow resume the next time it's called. Usually this will lead to
    demuxer errors. Make reconnecting block instead, until it has either
    successfully reconnected, or given up.
    
    Also make the wait reasonably interruptible. Since there is no mechanism
    for this in the API, polling is the best we can do. This behaves roughly
    the same as other interruptible network functions in libavformat.
    
    (The original code would work if it returned AVERROR(EAGAIN) or so,
    which would make retry_transfer_wrapper() repeat the read call. But I
    think having an explicit loop for this is better anyway.)
    
    I also snuck in a fix for reconnect_at_eof. It has to check for
    AVERROR_EOF, not 0.
    8a108bde
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...