avutil/mathematics: return INT64_MIN (=AV_NOPTS_VALUE) from av_rescale_rnd() for...
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Dec 2015 12:32:31 +0000 (13:32 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 14 Dec 2015 15:51:00 +0000 (16:51 +0100)
commit86a52988bd50b16d7f4c52e610de00d5354c5174
treef3f437c539cbaf8b0316f128cf967cc5bfb493a9
parentd259a0534ee2f89b103cfc52b988b452c6411662
avutil/mathematics: return INT64_MIN (=AV_NOPTS_VALUE) from av_rescale_rnd() for overflows

Fixes integer overflow
Fixes: mozilla bug 1229167

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f03c2ceec174877e03bb302f5971fbe9ffbe4856)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/mathematics.c