aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-18 00:20:51 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-18 00:55:27 +0100
commitcabd9ae5be8797bbafb8db15be5edd266d9efd7a (patch)
tree6adeb6111552228cc1890cd895071dbc3fc14971
parentcfbf608c0af6e45254e7d66903a31daf5452c2de (diff)
downloadffmpeg-cabd9ae5be8797bbafb8db15be5edd266d9efd7a.tar.gz
avcodec/h264_mc_template: prefetch list1 only if it is used in the MB
Fixes ubsan warning Fixes Mozilla bug 1230276 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c8ea57664fe3ad611c9ecd234670544ddff7ca55) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/h264_mc_template.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_mc_template.c b/libavcodec/h264_mc_template.c
index eaead35bb2..e4333a733c 100644
--- a/libavcodec/h264_mc_template.c
+++ b/libavcodec/h264_mc_template.c
@@ -158,6 +158,7 @@ static void MCFUNC(hl_motion)(const H264Context *h, H264SliceContext *sl,
}
}
- prefetch_motion(h, sl, 1, PIXEL_SHIFT, CHROMA_IDC);
+ if (USES_LIST(mb_type, 1))
+ prefetch_motion(h, sl, 1, PIXEL_SHIFT, CHROMA_IDC);
}