diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 37ff1102ea..327a24b164 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -24,6 +24,7 @@ * Motion estimation template. */ +#include "libavutil/qsort.h" #include "mpegvideo.h" //Let us hope gcc will remove the unused vars ...(gcc 3.2.2 seems to do it ...) @@ -723,7 +724,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin, j++; } - qsort(minima, j, sizeof(Minima), minima_cmp); + AV_QSORT(minima, j, Minima, minima_cmp); for(; j