Merge commit '94a417acc05cc5151b473abc0bf51fad26f8c5a0'

* commit '94a417acc05cc5151b473abc0bf51fad26f8c5a0':
  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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-01-04 01:18:33 +01:00
commit 3929c17405

View File

@ -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;