mirror of https://git.ffmpeg.org/ffmpeg.git
avformat: Fix overflow in compute_pkt_fields().
Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
71a822fa35
commit
63ce7c71bc
|
@ -1359,7 +1359,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
||||||
if (st->last_IP_duration == 0 && (uint64_t)pkt->duration <= INT32_MAX)
|
if (st->last_IP_duration == 0 && (uint64_t)pkt->duration <= INT32_MAX)
|
||||||
st->last_IP_duration = pkt->duration;
|
st->last_IP_duration = pkt->duration;
|
||||||
if (pkt->dts != AV_NOPTS_VALUE)
|
if (pkt->dts != AV_NOPTS_VALUE)
|
||||||
st->cur_dts = pkt->dts + st->last_IP_duration;
|
st->cur_dts = av_sat_add64(pkt->dts, st->last_IP_duration);
|
||||||
if (pkt->dts != AV_NOPTS_VALUE &&
|
if (pkt->dts != AV_NOPTS_VALUE &&
|
||||||
pkt->pts == AV_NOPTS_VALUE &&
|
pkt->pts == AV_NOPTS_VALUE &&
|
||||||
st->last_IP_duration > 0 &&
|
st->last_IP_duration > 0 &&
|
||||||
|
|
Loading…
Reference in New Issue