Commit 3929c174 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '94a417ac'

* commit '94a417ac':
  mathematics: remove asserts from av_rescale_rnd()

Conflicts:
	libavutil/mathematics.c

The asserts are left in place for now as no code checks the return
value, but we sure can change this if application developers
prefer
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 405b1ef8 94a417ac
......@@ -63,6 +63,9 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
av_assert2(b >=0);
av_assert2((unsigned)(rnd&~AV_ROUND_PASS_MINMAX)<=5 && (rnd&~AV_ROUND_PASS_MINMAX)!=4);
if (c <= 0 || b < 0 || !((unsigned)(rnd&~AV_ROUND_PASS_MINMAX)<=5 && (rnd&~AV_ROUND_PASS_MINMAX)!=4))
return INT64_MIN;
if (rnd & AV_ROUND_PASS_MINMAX) {
if (a == INT64_MIN || a == INT64_MAX)
return a;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment