aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_mvpred.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-08 21:53:15 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 20:35:19 +0200
commit625044336e6ec561740bbc4be6ee712c13e44e33 (patch)
tree51026ca7e1b7b9e9a9aaea46668e555e9e140432 /libavcodec/h264_mvpred.h
parent8b4386ab876483ffdb0be4daf48da1cd99632b6f (diff)
downloadffmpeg-625044336e6ec561740bbc4be6ee712c13e44e33.tar.gz
avcodec/h264_mvpred: Fix runtime error: left shift of negative value -1
Fixes: 734/clusterfuzz-testcase-4821293192970240 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 222c9f031de3315af62be6d7a99c71105e516088) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_mvpred.h')
-rw-r--r--libavcodec/h264_mvpred.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index 36151bf15c..18de4b0bbc 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -68,7 +68,7 @@ static av_always_inline int fetch_diagonal_mv(const H264Context *h, H264SliceCon
}
if (MB_FIELD(sl) && !IS_INTERLACED(sl->left_type[0])) {
// left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK.
- SET_DIAG_MV(/ 2, << 1, sl->left_mb_xy[i >= 36], ((i >> 2)) & 3);
+ SET_DIAG_MV(/ 2, *2, sl->left_mb_xy[i >= 36], ((i >> 2)) & 3);
}
}
#undef SET_DIAG_MV