[FFmpeg-soc] [soc]: r2767 - amr/amrnbfloatdec.c
superdump
subversion at mplayerhq.hu
Sat Jul 12 22:22:28 CEST 2008
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;
}
/**
More information about the FFmpeg-soc
mailing list