diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 1f2081017be95e1b9c106667a7e0b4652fa6d089..54af4742e49ee009952c4461903b06daa433c751 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -293,8 +293,8 @@ single_col:
 
     await_reference_mb_row(h, &h->ref_list[1][0], mb_y);
 
-    l1mv0  = &h->ref_list[1][0].f.motion_val[0][h->mb2b_xy [mb_xy]];
-    l1mv1  = &h->ref_list[1][0].f.motion_val[1][h->mb2b_xy [mb_xy]];
+    l1mv0  = (void*)&h->ref_list[1][0].f.motion_val[0][h->mb2b_xy [mb_xy]];
+    l1mv1  = (void*)&h->ref_list[1][0].f.motion_val[1][h->mb2b_xy [mb_xy]];
     l1ref0 = &h->ref_list[1][0].f.ref_index [0][4 * mb_xy];
     l1ref1 = &h->ref_list[1][0].f.ref_index [1][4 * mb_xy];
     if(!b8_stride){
@@ -484,8 +484,8 @@ single_col:
 
     await_reference_mb_row(h, &h->ref_list[1][0], mb_y);
 
-    l1mv0  = &h->ref_list[1][0].f.motion_val[0][h->mb2b_xy [mb_xy]];
-    l1mv1  = &h->ref_list[1][0].f.motion_val[1][h->mb2b_xy [mb_xy]];
+    l1mv0  = (void*)&h->ref_list[1][0].f.motion_val[0][h->mb2b_xy [mb_xy]];
+    l1mv1  = (void*)&h->ref_list[1][0].f.motion_val[1][h->mb2b_xy [mb_xy]];
     l1ref0 = &h->ref_list[1][0].f.ref_index [0][4 * mb_xy];
     l1ref1 = &h->ref_list[1][0].f.ref_index [1][4 * mb_xy];
     if(!b8_stride){