mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
avformat/utils: fix calculating the absolute difference of timestamps
we dont use FFABS(a-b) as that could result in undefined behavior if it overflows Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
720dffb843
commit
a5e5959d52
@ -1105,7 +1105,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
||||
if (pkt->dts != AV_NOPTS_VALUE &&
|
||||
pkt->pts == AV_NOPTS_VALUE &&
|
||||
st->last_IP_duration > 0 &&
|
||||
(st->cur_dts - next_dts) <= 1 &&
|
||||
((uint64_t)st->cur_dts - (uint64_t)next_dts + 1) <= 2 &&
|
||||
next_dts != next_pts &&
|
||||
next_pts != AV_NOPTS_VALUE)
|
||||
pkt->pts = next_dts;
|
||||
|
Loading…
x
Reference in New Issue
Block a user