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

Git pushed a commit to branch master
in repository ffmpeg.

commit f88f1041a619aea745336557d1a9523233b45c61
Author:     Xiujun Wang <[email protected]>
AuthorDate: Tue Sep 29 21:15:55 2026 +0800
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Tue Sep 29 22:57:01 2026 +0200

    avformat/hls: advance the init section read pointer
    
    The init section is read through a fixed-size AVIO buffer. When it
    needs more than one read, copying from the start again duplicates the
    first chunk and corrupts the data that follows. Copy from the current
    read offset instead.
    
    Fixes: #24603
    Signed-off-by: Xiujun Wang <[email protected]>
---
 libavformat/hls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 5c530215e0..38d2a99fb2 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1848,7 +1848,7 @@ restart:
     if (v->init_sec_buf_read_offset < v->init_sec_data_len) {
         /* Push init section out first before first actual segment */
         int copy_size = FFMIN(v->init_sec_data_len - 
v->init_sec_buf_read_offset, buf_size);
-        memcpy(buf, v->init_sec_buf, copy_size);
+        memcpy(buf, v->init_sec_buf + v->init_sec_buf_read_offset, copy_size);
         v->init_sec_buf_read_offset += copy_size;
         return copy_size;
     }

-- 
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