diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-10-18 03:02:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-18 03:02:48 +0000 |
commit | 15862411e696ffab99821e6204f48806d1b34ead (patch) | |
tree | 81b12485164c3cabd56ad00a83c79a8a0c622dfe | |
parent | daed32f7d02d1d8d7e21675f059168b82213658a (diff) | |
download | ffmpeg-15862411e696ffab99821e6204f48806d1b34ead.tar.gz |
infinte recursion fix
Originally committed as revision 3606 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 21d885d221..2d2fc14c0e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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(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; |