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

Git pushed a commit to branch master
in repository ffmpeg.

commit 5f95a1e714f4e9dc71eebb016c2acf41c2aed2a9
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Jan 22 15:31:02 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Sat Feb 7 10:02:36 2026 +0000

    avformat/http: fix noop seek check
    
    This fails to consider the case of whence == SEEK_END and the resulting
    offset happening to exactly match the current position.
    
    Reorder the check to compute the target position first, then compare.
---
 libavformat/http.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 6ee498b4df..f565e1e7fa 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -2008,10 +2008,6 @@ static int64_t http_seek_internal(URLContext *h, int64_t 
off, int whence, int fo
 
     if (whence == AVSEEK_SIZE)
         return s->filesize;
-    else if (!force_reconnect &&
-             ((whence == SEEK_CUR && off == 0) ||
-              (whence == SEEK_SET && off == s->off)))
-        return s->off;
     else if ((s->filesize == UINT64_MAX && whence == SEEK_END))
         return AVERROR(ENOSYS);
 
@@ -2023,6 +2019,8 @@ static int64_t http_seek_internal(URLContext *h, int64_t 
off, int whence, int fo
         return AVERROR(EINVAL);
     if (off < 0)
         return AVERROR(EINVAL);
+    if (!force_reconnect && off == s->off)
+        return s->off;
     s->off = off;
 
     if (s->off && h->is_streamed)

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to