Mercurial > libavcodec.hg
diff utils.c @ 2301:79b14ad60f81 libavcodec
infinte recursion fix
author | michael |
---|---|
date | Mon, 18 Oct 2004 03:02:48 +0000 |
parents | 7b345b735ac7 |
children | 550ae8914fd3 |
line wrap: on
line diff
--- a/utils.c Sun Oct 17 20:27:11 2004 +0000 +++ b/utils.c Mon Oct 18 03:02:48 2004 +0000 @@ -843,7 +843,7 @@ assert(b >=0); 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; else if(rnd&1) r= c-1;