diff options
author | Marton Balint <cus@passwd.hu> | 2018-11-01 20:48:55 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2018-11-01 21:04:57 +0100 |
commit | 6a034adf7516fde8733064ed7ba5c77554298047 (patch) | |
tree | 50b7793a85987a8b78886df3aabde2de97b0c366 | |
parent | 295fd12d17f339bdde0940d1f1885cf6db67e5d5 (diff) | |
download | ffmpeg-6a034adf7516fde8733064ed7ba5c77554298047.tar.gz |
avformat/ftp: return AVERROR_EOF for EOF
Without this FTP just hangs on eof...
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | libavformat/ftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c index 676f1c6b4c..5063b7c204 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -781,13 +781,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; } |