X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils_opencl.c;h=dd21344a056f283a03e2a52858bcf111fdaaf107;hb=cee3c9d29aceec8cddd829acd6dfb56dc5f60322;hp=61478e27af9df7f5a8b76280bc47f5175144359e;hpb=af065bf11b61e3a1c4e3d0e9709584e8b24d9136;p=ffmpeg diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index 61478e27af9..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 ((OpenCLDeviceBenchmark*)a)->runtime - ((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)