aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2018-11-01 20:48:55 +0100
committerMarton Balint <cus@passwd.hu>2018-11-01 23:12:19 +0100
commitebc01c8f6dfc57c4ea5c33b29673e9851a6f19d1 (patch)
tree4b4738632c81deef342b70369166a52556efe129
parent00e7e4b1880678d8df0a0627b77e92d36ff32f8f (diff)
downloadffmpeg-ebc01c8f6dfc57c4ea5c33b29673e9851a6f19d1.tar.gz
avformat/ftp: return AVERROR_EOF for EOF
Without this FTP just hangs on eof... Signed-off-by: Marton Balint <cus@passwd.hu> (cherry picked from commit 6a034adf7516fde8733064ed7ba5c77554298047)
-rw-r--r--libavformat/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index 9aa7a45629..35bfbd47ab 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -783,13 +783,13 @@ static int ftp_read(URLContext *h, unsigned char *buf, int size)
if (s->state == DISCONNECTED) {
/* optimization */
if (s->position >= s->filesize)
- return 0;
+ return AVERROR_EOF;
if ((err = ftp_connect_data_connection(h)) < 0)
return err;
}
if (s->state == READY) {
if (s->position >= s->filesize)
- return 0;
+ return AVERROR_EOF;
if ((err = ftp_retrieve(s)) < 0)
return err;
}