Without this FTP just hangs on eof...
Signed-off-by: Marton Balint <cus@passwd.hu>
... | ... |
@@ -781,13 +781,13 @@ static int ftp_read(URLContext *h, unsigned char *buf, int size) |
781 | 781 |
if (s->state == DISCONNECTED) { |
782 | 782 |
/* optimization */ |
783 | 783 |
if (s->position >= s->filesize) |
784 |
- return 0; |
|
784 |
+ return AVERROR_EOF; |
|
785 | 785 |
if ((err = ftp_connect_data_connection(h)) < 0) |
786 | 786 |
return err; |
787 | 787 |
} |
788 | 788 |
if (s->state == READY) { |
789 | 789 |
if (s->position >= s->filesize) |
790 |
- return 0; |
|
790 |
+ return AVERROR_EOF; |
|
791 | 791 |
if ((err = ftp_retrieve(s)) < 0) |
792 | 792 |
return err; |
793 | 793 |
} |