[FFmpeg-cvslog] r25283 - trunk/libavutil/rational.h
michael
subversion
Fri Oct 1 14:00:29 CEST 2010
Author: michael
Date: Fri Oct 1 14:00:29 2010
New Revision: 25283
Log:
Fix av_cmp_q() with negative denominators.
Modified:
trunk/libavutil/rational.h
Modified: trunk/libavutil/rational.h
==============================================================================
--- trunk/libavutil/rational.h Fri Oct 1 13:08:28 2010 (r25282)
+++ trunk/libavutil/rational.h Fri Oct 1 14:00:29 2010 (r25283)
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list