1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

infinte recursion fix

Originally committed as revision 3606 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2004-10-18 03:02:48 +00:00
parent daed32f7d0
commit 15862411e6

View File

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