On Thu, Jun 02, 2016 at 02:29:47PM +0200, Camille Gonnet wrote: > When writing files to FTP, if the data connection is closed before the > control connection, the server may handle it as an aborted file transfer > and create and leave the file empty.
which ftp server, or is that in the RFC, if so please refer to it > > --- > libavformat/ftp.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/libavformat/ftp.c b/libavformat/ftp.c > index 0663b47..00747bb 100644 > --- a/libavformat/ftp.c > +++ b/libavformat/ftp.c > @@ -220,15 +220,21 @@ static int ftp_send_command(FTPContext *s, const char > *command, > > static void ftp_close_data_connection(FTPContext *s) > { > - ffurl_closep(&s->conn_data); > +static const int close_codes[] = {225, 226, 0}; indention inconsistent > + > + if (s->conn_data) { > + ffurl_closep(&s->conn_data); > + // Need to wait for status, or file transfer might be aborted on > server side > + ftp_status(s, NULL, close_codes); patch corrupted by a newline [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel