]> git.sesse.net Git - ffmpeg/commit
avutil/common: Add saturated add/sub operations for int64_t.
authorDale Curtis <dalecurtis@chromium.org>
Thu, 30 Apr 2020 22:16:31 +0000 (15:16 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 15 May 2020 20:03:36 +0000 (22:03 +0200)
commita7e1af3cb10b7c914622deff3435bc200000eb65
treef442957417076bb7a2266da0f7ecfd638783179d
parent2d8d554f15a7a27cfeca81467cc9341a86f784e2
avutil/common: Add saturated add/sub operations for int64_t.

Many places are using their own custom code for handling overflow
around timestamps or other int64_t values. There are enough of these
now that having some common saturated math functions seems sound.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/common.h