Commit 6a034adf authored by Marton Balint's avatar Marton Balint

avformat/ftp: return AVERROR_EOF for EOF

Without this FTP just hangs on eof...
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 295fd12d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment