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

Fix av_cmp_q() with negative denominators.

Originally committed as revision 25283 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2010-10-01 12:00:29 +00:00
parent 0f4cd732f1
commit 8a47d90b29

View File

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