This commit reconnect both connections and retries before ftp_read returns an error.
Practical use case: resume after lock screen on iOS devices.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ABOR command usually takes long (FTP server implementation dependent).
It also produces different response codes from different servers.
It is save for ffmpeg to reconnect both connection during seek for two reasons:
1. Alreay mentioned heavy manner of ABOR command.
2. Server may disconnected due to no transfer (seek after a long pause in ffmpeg client)
Reimplementation of ftp_status function.
New version requires explicit list of expected codes.
It flush data connection input before sending a command
and blocks until expected result appears.
Both strtoll and atoll have different names on MSVC, and strtoll has a
compatibility layer in place for this case.
Fixes compilation on MSVC.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>