[FFmpeg-devel] [PATCH 1/2] avformat/ftp: return AVERROR_EOF for EOF
Marton Balint
cus at passwd.hu
Thu Nov 1 22:06:40 EET 2018
Without this FTP just hangs on eof...
Signed-off-by: Marton Balint <cus at passwd.hu>
---
libavformat/ftp.c | 4 ++--
1 file 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;
}
--
2.16.4
More information about the ffmpeg-devel
mailing list