h264: Add missing casts to complex pointer assignments

Message ID 1497298259-1167-1-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun June 12, 2017, 8:10 p.m.
Fixes several warnings of the type:
libavcodec/h264_direct.c:326:11: warning: assignment from incompatible pointer type
---
 libavcodec/h264_direct.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 7ec49b6..50cbabc 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -323,8 +323,8 @@  single_col:
 
     await_reference_mb_row(h, &sl->ref_list[1][0], mb_y);
 
-    l1mv0  = &sl->ref_list[1][0].parent->motion_val[0][h->mb2b_xy[mb_xy]];
-    l1mv1  = &sl->ref_list[1][0].parent->motion_val[1][h->mb2b_xy[mb_xy]];
+    l1mv0  = (const int16_t (*)[2]) &sl->ref_list[1][0].parent->motion_val[0][h->mb2b_xy[mb_xy]];
+    l1mv1  = (const int16_t (*)[2]) &sl->ref_list[1][0].parent->motion_val[1][h->mb2b_xy[mb_xy]];
     l1ref0 = &sl->ref_list[1][0].parent->ref_index[0][4 * mb_xy];
     l1ref1 = &sl->ref_list[1][0].parent->ref_index[1][4 * mb_xy];
     if (!b8_stride) {
@@ -547,8 +547,8 @@  single_col:
 
     await_reference_mb_row(h, &sl->ref_list[1][0], mb_y);
 
-    l1mv0  = &sl->ref_list[1][0].parent->motion_val[0][h->mb2b_xy[mb_xy]];
-    l1mv1  = &sl->ref_list[1][0].parent->motion_val[1][h->mb2b_xy[mb_xy]];
+    l1mv0  = (const int16_t (*)[2]) &sl->ref_list[1][0].parent->motion_val[0][h->mb2b_xy[mb_xy]];
+    l1mv1  = (const int16_t (*)[2]) &sl->ref_list[1][0].parent->motion_val[1][h->mb2b_xy[mb_xy]];
     l1ref0 = &sl->ref_list[1][0].parent->ref_index[0][4 * mb_xy];
     l1ref1 = &sl->ref_list[1][0].parent->ref_index[1][4 * mb_xy];
     if (!b8_stride) {