X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils_opencl.c;h=dd21344a056f283a03e2a52858bcf111fdaaf107;hb=cee3c9d29aceec8cddd829acd6dfb56dc5f60322;hp=d9095b61be27f7620cbf304c554e33a3e306ebde;hpb=f79bb118f58988059768140e517b67a6fb2c07c7;p=ffmpeg diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index d9095b61be2..dd21344a056 100644 --- a/cmdutils_opencl.c +++ b/cmdutils_opencl.c @@ -206,7 +206,9 @@ end: static int compare_ocl_device_desc(const void *a, const void *b) { - return ((const OpenCLDeviceBenchmark*)a)->runtime - ((const OpenCLDeviceBenchmark*)b)->runtime; + const OpenCLDeviceBenchmark* va = (const OpenCLDeviceBenchmark*)a; + const OpenCLDeviceBenchmark* vb = (const OpenCLDeviceBenchmark*)b; + return FFDIFFSIGN(va->runtime , vb->runtime); } int opt_opencl_bench(void *optctx, const char *opt, const char *arg)