summaryrefslogtreecommitdiff
path: root/libavfilter/vf_deshake.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-19 00:03:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-19 00:03:13 +0200
commit5ed20cfeaf9d83b8859e53e4965c308f87037da8 (patch)
tree3c8a55978d8469e6b963f80f481c8c5b749519fd /libavfilter/vf_deshake.c
parente96aa8d1a064bbcfacbe80371bac1e49398a48e7 (diff)
vf_deshake: Fix cast discards qualifiers from pointer target type warning.
And simplify the code in the process. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_deshake.c')
-rw-r--r--libavfilter/vf_deshake.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index 6128cb9b60..9f404c5557 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -94,10 +94,8 @@ typedef struct {
Transform avg;
} DeshakeContext;
-static int cmp(void const *ca, void const *cb)
+static int cmp(const double *a, const double *b)
{
- double *a = (double *) ca;
- double *b = (double *) cb;
return *a < *b ? -1 : ( *a > *b ? 1 : 0 );
}
@@ -110,7 +108,7 @@ static double clean_mean(double *values, int count)
int cut = count / 5;
int x;
- qsort(values, count, sizeof(double), cmp);
+ qsort(values, count, sizeof(double), (void*)cmp);
for (x = cut; x < count - cut; x++) {
mean += values[x];