mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
avformat/ftp: return AVERROR_EOF for EOF
Without this FTP just hangs on eof... Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
295fd12d17
commit
6a034adf75
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user