Commit 3c667d0947 for ffmpeg

commit 3c667d09475f4ff920f7bfca21c269e01cc5efcf
Author: Kacper Michajłow <kasper93@gmail.com>
Date:   Tue Sep 29 22:57:34 2026 +0200

    avformat/dashdec: copy the init section from the current read offset

    Every read after the first copied the init section from its start
    again, which corrupted init segments larger than one read.

    Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 76352c1708..ffef5bfb2f 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1888,7 +1888,7 @@ restart:
     if (v->init_sec_buf_read_offset < v->init_sec_data_len) {
         /* Push init section out first before first actual fragment */
         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;
         ret = copy_size;
         goto end;