Commit f22845804b for ffmpeg

commit f22845804beb63788c67c435e6b34713ef8c4a12
Author: Kacper Michajłow <kasper93@gmail.com>
Date:   Sat Dec 5 01:52:08 2026 +0100

    avformat/mov: saturate the pts of a frame in an edit

    Fixes: signed integer overflow: 9223372036854775294 + 1024 cannot be represented in type 'long int'
    Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

diff --git a/libavformat/mov.c b/libavformat/mov.c
index c79caaa047..bf87794e66 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4939,10 +4939,11 @@ static void mov_fix_index(MOVContext *mov, AVStream *st)
                     }
                 }
             } else {
+                int64_t pts = av_sat_add64(edit_list_dts_counter, curr_ctts + msc->dts_shift);
                 if (msc->min_corrected_pts < 0) {
-                    msc->min_corrected_pts = edit_list_dts_counter + curr_ctts + msc->dts_shift;
+                    msc->min_corrected_pts = pts;
                 } else {
-                    msc->min_corrected_pts = FFMIN(msc->min_corrected_pts, edit_list_dts_counter + curr_ctts + msc->dts_shift);
+                    msc->min_corrected_pts = FFMIN(msc->min_corrected_pts, pts);
                 }
                 if (edit_list_start_encountered == 0) {
                     edit_list_start_encountered = 1;