fix: diff --git a/libavformat/ftp.c b/libavformat/ftp.c index 9aa7a45629..3474a0adbc 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -777,7 +777,11 @@ static int ftp_read(URLContext *h, unsigned char *buf, int size) { FTPContext *s = h->priv_data; int read, err, retry_done = 0; - + if(s->position >= s->filesize) + { + ff_dlog(h,"ftp protocol reach file end\n"); + return AVERROR_EOF; + } ff_dlog(h, "ftp protocol read %d bytes\n", size); retry: if (s->state == DISCONNECTED) {
use follow command hang up ./ffmpeg -loglevel level+debug -i ftp://chiwailam:"abcd1234!"@ 192.168.1.114/orgvideos/9926558478.avi -f null - ffmpeg version: libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100
ftp_hang_because_not_return_eof.patch
Description: Binary data
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel