Commit 941598a1ef for ffmpeg

commit 941598a1efd4f7e43895d5d001e4f52663ff2709
Author: zhang xingxing <2388969553@qq.com>
Date:   Thu Oct 15 04:35:32 2026 +0200

    avformat/dashdec: do not seek before the first segment

    Fixes: lyANsYWHaqPo
    Fixes: swarm-Out-of-bounds-fragments-array-index-lacks-sign-check-38a148

    Found-by: zhang xingxing <2388969553@qq.com>

    Request of nonexistent segments Replicated through UnModified FFmpeg with the demuxer log

    Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 8b0fb0361d..68ccb73bd0 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -2509,6 +2509,7 @@ set_seq_num:
                (int64_t)pls->cur_seq_no);
     } else if (pls->fragment_duration > 0) {
         pls->cur_seq_no = pls->first_seq_no + ((seek_pos_msec * pls->fragment_timescale) / pls->fragment_duration) / 1000;
+        pls->cur_seq_no = FFMAX(pls->cur_seq_no, pls->first_seq_no);
     } else {
         av_log(pls->parent, AV_LOG_ERROR, "dash_seek missing timeline or fragment_duration\n");
         pls->cur_seq_no = pls->first_seq_no;