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.

This adds implementations that just use the builtin functions for
recent gcc, clang when available or implements its own version for
older compilers.

Signed-off-by: Dale Curtis <[email protected]>
---
 libavutil/mathematics.c | 26 ++++++++++++++++++++++++++
 libavutil/mathematics.h | 19 +++++++++++++++++++
 2 files changed, 45 insertions(+)

Attachment: sat_math_v0.patch
Description: Binary data

_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to