diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-10-01 12:00:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-10-01 12:00:29 +0000 |
commit | 8a47d90b2918c74a26bd313e8e70452bdc969a02 (patch) | |
tree | 7570e96a14e0a91c1b4d4ffd68f87ab4a70bce14 | |
parent | 0f4cd732f156141eb846b7ab975e99d58a23fcb4 (diff) | |
download | ffmpeg-8a47d90b2918c74a26bd313e8e70452bdc969a02.tar.gz |
Fix av_cmp_q() with negative denominators.
Originally committed as revision 25283 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavutil/rational.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/rational.h b/libavutil/rational.h index 2dd0c2c594..7c6605cce7 100644 --- a/libavutil/rational.h +++ b/libavutil/rational.h @@ -48,7 +48,7 @@ typedef struct AVRational{ static inline int av_cmp_q(AVRational a, AVRational b){ const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den; - if(tmp) return (tmp>>63)|1; + if(tmp) return ((tmp ^ a.den ^ b.den)>>63)|1; else return 0; } |