Author: superdump
Date: Sat Jul 12 22:22:27 2008
New Revision: 2767

Log:
Alter qsort_compare() to adhere to the rules in the man page


Modified:
   amr/amrnbfloatdec.c

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c (original)
+++ amr/amrnbfloatdec.c Sat Jul 12 22:22:27 2008
@@ -882,8 +882,13 @@ static inline float av_clipf(float a, fl
  * @return a-b : the result of the comparison
  */
 
-float qsort_compare(const float *a, const float *b) {
-    return (float)(*a - *b);
+int qsort_compare(const float *a, const float *b) {
+    float diff = *a - *b;
+    if(diff > 0.0f)
+        return 1;
+    if(diff < 0.0f)
+        return -1;
+    return 0;
 }
 
 /**
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to