summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-12 14:14:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-12 14:14:54 +0200
commit8de021fabe3a1c7a1465d5fa6e238803a3d82f04 (patch)
treec7233f8306d57a766d9e609c26963f3e712c01e1 /libavformat
parent23c8a3353bd948f4a69116124dc433c85909d86e (diff)
parent3a92ee59531611e1daa8f25b7b673c920781290f (diff)
Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master: avformat/ftp: add log regarding passive mode failure avformat/ftp: fix possible deadlock avdevice/pulse_audio_enc: fix stream index Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/ftp.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index eb3827fa35..ed9a3db419 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -270,6 +270,8 @@ static int ftp_passive_mode(FTPContext *s)
fail:
av_free(res);
s->server_data_port = -1;
+ av_log(s, AV_LOG_ERROR, "Set passive mode failed\n"
+ "Your FTP server may use IPv6 which is not supported yet.\n");
return AVERROR(EIO);
}
@@ -421,7 +423,7 @@ static int ftp_connect_control_connection(URLContext *h)
}
if ((err = ftp_type(s)) < 0) {
- av_dlog(h, "Set content type failed\n");
+ av_log(h, AV_LOG_ERROR, "Set content type failed\n");
return err;
}
}
@@ -437,10 +439,8 @@ static int ftp_connect_data_connection(URLContext *h)
if (!s->conn_data) {
/* Enter passive mode */
- if ((err = ftp_passive_mode(s)) < 0) {
- av_dlog(h, "Set passive mode failed\n");
+ if ((err = ftp_passive_mode(s)) < 0)
return err;
- }
/* Open data connection */
ff_url_join(buf, sizeof(buf), "tcp", NULL, s->hostname, s->server_data_port, NULL);
if (s->rw_timeout != -1) {
@@ -486,14 +486,13 @@ static int ftp_abort(URLContext *h)
}
} else {
ftp_close_data_connection(s);
- }
-
- if (ftp_status(s, NULL, abor_codes) < 225) {
- /* wu-ftpd also closes control connection after data connection closing */
- ffurl_closep(&s->conn_control);
- if ((err = ftp_connect_control_connection(h)) < 0) {
- av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");
- return err;
+ if (ftp_status(s, NULL, abor_codes) < 225) {
+ /* wu-ftpd also closes control connection after data connection closing */
+ ffurl_closep(&s->conn_control);
+ if ((err = ftp_connect_control_connection(h)) < 0) {
+ av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");
+ return err;
+ }
}
}