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

Git pushed a commit to branch master
in repository ffmpeg.

commit 723a855e52cabe7784193b7cd63772bd8916ee55
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Sun Jul 26 13:47:27 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Mon Jul 27 17:05:20 2026 +0000

    avformat/libcurl: validate that the server honored a requested start offset
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavformat/libcurl.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/libcurl.c b/libavformat/libcurl.c
index d9f1e1884d..80e9da8178 100644
--- a/libavformat/libcurl.c
+++ b/libavformat/libcurl.c
@@ -300,7 +300,11 @@ static size_t header_callback(char *ptr, size_t size, 
size_t nitems, void *userd
     pthread_mutex_lock(&c->mutex);
     if (status >= 200 && status < 300) {
         int64_t content_start = status == 206 ? c->hdr_content_start : 0;
-        if (c->probed && c->seekable && content_start != c->request_start) {
+        /* The reply must start at the offset we requested: for follow-up
+         * requests always, for the initial one when an explicit nonzero
+         * offset was requested. */
+        if ((c->probed ? c->seekable : c->off > 0) &&
+            content_start != c->request_start) {
             av_log(c->h, AV_LOG_ERROR, "Server sent back unexpected reply "
                    "with offset %"PRId64" (expected %"PRId64")\n",
                    content_start, c->request_start);

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

Reply via email to