diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c
index a3d9357a02a7ad929589f5800d662b537239726b..2b179bdc83791bacdf326f963f1825403b3e55b0 100644
--- a/libswscale/swscale-example.c
+++ b/libswscale/swscale-example.c
@@ -100,9 +100,9 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, int srcFormat
         else
             dstStride[i]= dstW*4;
 
-        src[i]= (uint8_t*) malloc(srcStride[i]*srcH);
-        dst[i]= (uint8_t*) malloc(dstStride[i]*dstH);
-        out[i]= (uint8_t*) malloc(refStride[i]*h);
+        src[i]= malloc(srcStride[i]*srcH);
+        dst[i]= malloc(dstStride[i]*dstH);
+        out[i]= malloc(refStride[i]*h);
         if (!src[i] || !dst[i] || !out[i]) {
             perror("Malloc");
             res = -1;