Commit b9fada3b79 for ffmpeg

commit b9fada3b794978e287fec371c1db235081fefba5
Author: Matthew Crossley <Matthew.Crossley@thomsonreuters.com>
Date:   Mon Nov 9 09:21:14 2026 +0000

    avformat/dashdec: compute segment bounds after refreshing manifest

    min_seq_no and max_seq_no were computed before refresh_manifest(), so
    were using the bounds of the previous manifest. Segments only available
    in refreshed manifest were treated as not yet available.

    A sequence equal to the refreshed minimum is still available, so retain
    it instead of treating it as expired and selecting a new live position.

    Calculate the bounds after refresh instead.

    Signed-off-by: Matthew Crossley <Matthew.Crossley@thomsonreuters.com>

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 43cbfa18ab..db5a09e386 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1732,7 +1732,10 @@ static struct fragment *get_current_fragment(struct representation *pls)
         if (pls->timelines || pls->fragments) {
             refresh_manifest(pls->parent);
         }
-        if (pls->cur_seq_no <= min_seq_no) {
+        min_seq_no = calc_min_seg_no(pls->parent, pls);
+        max_seq_no = calc_max_seg_no(pls, c);
+
+        if (pls->cur_seq_no < min_seq_no) {
             av_log(pls->parent, AV_LOG_VERBOSE, "old fragment: cur[%"PRId64"] min[%"PRId64"] max[%"PRId64"]\n", (int64_t)pls->cur_seq_no, min_seq_no, max_seq_no);
             pls->cur_seq_no = calc_cur_seg_no(pls->parent, pls);
         } else if (pls->cur_seq_no > max_seq_no) {