This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 45f34b7dfef3f77ee941bc7fc899b05497869a6e
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Oct 15 14:40:25 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Oct 18 03:19:28 2026 +0000

    avformat/ftp: end a directory listing when the data connection ends
    
    ffurl_read() reports the end of the data with AVERROR_EOF, which
    ftp_read_dir() passed on as an error instead of ending the listing.
    
    Fixes: avio_list_dir on a directory served by pyftpdlib 2.0.1
    Assisted-by: Claude
---
 libavformat/ftp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index 07dd68d7e9..44adef7eab 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -1071,9 +1071,9 @@ static int ftp_read_dir(URLContext *h, AVIODirEntry 
**next)
             if (s->dir_buffer_size)
                 memmove(s->dir_buffer, start, s->dir_buffer_size);
             ret = ffurl_read(s->conn_data, s->dir_buffer + s->dir_buffer_size, 
DIR_BUFFER_SIZE - (s->dir_buffer_size + 1));
-            if (ret < 0)
+            if (ret < 0 && ret != AVERROR_EOF)
                 return ret;
-            if (!ret) {
+            if (ret <= 0) {
                 *next = NULL;
                 return 0;
             }

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to