diff options
author | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2012-03-18 23:04:14 +0000 |
---|---|---|
committer | k-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2012-03-18 23:04:14 +0000 |
commit | 96a355913e633a41b6e9192b0791ffb47aecbe20 (patch) | |
tree | d0a5fb34c974ddbd7f095cc397e1d3f861610703 /src/lib/ffmpeg/rational.pas | |
parent | 46d9c88dcf104d96bb20504a88954ff6f2e6db59 (diff) | |
download | usdx-96a355913e633a41b6e9192b0791ffb47aecbe20.tar.gz usdx-96a355913e633a41b6e9192b0791ffb47aecbe20.tar.xz usdx-96a355913e633a41b6e9192b0791ffb47aecbe20.zip |
revert false commit
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2840 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lib/ffmpeg/rational.pas')
-rw-r--r-- | src/lib/ffmpeg/rational.pas | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/ffmpeg/rational.pas b/src/lib/ffmpeg/rational.pas index 45ca8b87..892f2273 100644 --- a/src/lib/ffmpeg/rational.pas +++ b/src/lib/ffmpeg/rational.pas @@ -23,7 +23,7 @@ * - Changes and updates by the UltraStar Deluxe Team * * Conversion of libavutil/rational.h - * avutil version 50.43.0 + * avutil max. version 50.21.0, revision 24190, Wed Jul 21 01:00:00 2010 CET * *) @@ -62,7 +62,8 @@ type * Compare two rationals. * @param a first rational * @param b second rational - * @return 0 if a==b, 1 if a>b and -1 if a<b + * @return 0 if a==b, 1 if a>b, -1 if a<b, and INT_MIN if one of the + * values is of the form 0/0 *) function av_cmp_q(a: TAVRational; b: TAVRational): cint; {$IFDEF HasInline}inline;{$ENDIF} @@ -160,6 +161,12 @@ begin Result := (tmp shr 63) or 1 else Result := 0 +{ new version: + if(tmp) return ((tmp ^ a.den ^ b.den)>>63)|1; + else if(b.den && a.den) return 0; + else if(a.num && b.num) return (a.num>>31) - (b.num>>31); + else return INT_MIN; +} end; function av_q2d(a: TAVRational): cdouble; |