Commit ebc01c8f 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>
(cherry picked from commit 6a034adf)
parent 00e7e4b1
......@@ -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;
}
......
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