Commit 15862411 authored by Michael Niedermayer's avatar Michael Niedermayer

infinte recursion fix

Originally committed as revision 3606 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent daed32f7
...@@ -843,7 +843,7 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){ ...@@ -843,7 +843,7 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
assert(b >=0); assert(b >=0);
assert(rnd >=0 && rnd<=5 && rnd!=4); assert(rnd >=0 && rnd<=5 && rnd!=4);
if(a<0) return -av_rescale_rnd(-a, b, c, rnd ^ ((rnd>>1)&1)); if(a<0 && a != INT64_MIN) return -av_rescale_rnd(-a, b, c, rnd ^ ((rnd>>1)&1));
if(rnd==AV_ROUND_NEAR_INF) r= c/2; if(rnd==AV_ROUND_NEAR_INF) r= c/2;
else if(rnd&1) r= c-1; else if(rnd&1) r= c-1;
......
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