mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mov: Fix integer overflow in mov_read_packet().
Fixes https://crbug.com/1499669:
runtime error: signed integer overflow: 9223372036853334272 + 1375731456
cannot be represented in type 'int64_t' (aka 'long')
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2182173a69
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bd7a10a2a8
commit
84b928f90f
|
@ -8008,7 +8008,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
pkt->flags |= AV_PKT_FLAG_DISCARD;
|
||||
}
|
||||
if (sc->ctts_data && sc->ctts_index < sc->ctts_count) {
|
||||
pkt->pts = pkt->dts + sc->dts_shift + sc->ctts_data[sc->ctts_index].duration;
|
||||
pkt->pts = av_sat_add64(pkt->dts, av_sat_add64(sc->dts_shift, sc->ctts_data[sc->ctts_index].duration));
|
||||
/* update ctts context */
|
||||
sc->ctts_sample++;
|
||||
if (sc->ctts_index < sc->ctts_count &&
|
||||
|
|
Loading…
Reference in New Issue