[FFmpeg-cvslog] avformat/ftp: fix possible deadlock

Lukasz Marek git at videolan.org
Sat Oct 12 14:19:27 CEST 2013


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Sat Oct 12 12:53:54 2013 +0200| [e1fb3143bb3a6006612fe0e1d1a15c8eb4955802] | committer: Lukasz Marek

avformat/ftp: fix possible deadlock

Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1fb3143bb3a6006612fe0e1d1a15c8eb4955802
---

 libavformat/ftp.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index eb3827f..aaa9410 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -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;
+            }
         }
     }
 



More information about the ffmpeg-cvslog mailing list