mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/utils: Fix "libavformat/utils.c:927:35: runtime error: signed integer overflow: -2450238577049583619 - 9223090561878065151 cannot be represented in type long long"
Fixes Mozilla bug 1229205 Found-by: Tyson Smith Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ed08cbd7b1
commit
cafb195604
@ -912,7 +912,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
|||||||
AVStream *st = s->streams[stream_index];
|
AVStream *st = s->streams[stream_index];
|
||||||
AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue;
|
AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue;
|
||||||
int64_t pts_buffer[MAX_REORDER_DELAY+1];
|
int64_t pts_buffer[MAX_REORDER_DELAY+1];
|
||||||
int64_t shift;
|
uint64_t shift;
|
||||||
int i, delay;
|
int i, delay;
|
||||||
|
|
||||||
if (st->first_dts != AV_NOPTS_VALUE ||
|
if (st->first_dts != AV_NOPTS_VALUE ||
|
||||||
@ -924,7 +924,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
|||||||
delay = st->codec->has_b_frames;
|
delay = st->codec->has_b_frames;
|
||||||
st->first_dts = dts - (st->cur_dts - RELATIVE_TS_BASE);
|
st->first_dts = dts - (st->cur_dts - RELATIVE_TS_BASE);
|
||||||
st->cur_dts = dts;
|
st->cur_dts = dts;
|
||||||
shift = st->first_dts - RELATIVE_TS_BASE;
|
shift = (uint64_t)st->first_dts - RELATIVE_TS_BASE;
|
||||||
|
|
||||||
for (i = 0; i<MAX_REORDER_DELAY+1; i++)
|
for (i = 0; i<MAX_REORDER_DELAY+1; i++)
|
||||||
pts_buffer[i] = AV_NOPTS_VALUE;
|
pts_buffer[i] = AV_NOPTS_VALUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user