avformat/mov: Use int64_t in intermediate for corrected_dts

Fixes: CID1500312 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 034054b370)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 9 months ago
parent 488aa52371
commit d44a75849c
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavformat/mov.c

@ -3383,7 +3383,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc->stts_data[i].duration = 1;
corrected_dts += (delta_magnitude < 0 ? (int64_t)delta_magnitude : 1) * sample_count;
} else {
corrected_dts += sample_duration * sample_count;
corrected_dts += sample_duration * (int64_t)sample_count;
}
current_dts += sc->stts_data[i].duration * (int64_t)sample_count;

Loading…
Cancel
Save