Commit dab70c62 authored by Michael Niedermayer's avatar Michael Niedermayer

ivi_common: check ref_tile size, fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a93c7ca6
......@@ -308,7 +308,10 @@ av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_hei
tile->ref_mbs = 0;
if (p || b) {
if (tile->num_MBs <= ref_tile->num_MBs) {
tile->ref_mbs = ref_tile->mbs;
}else
av_log(0, AV_LOG_DEBUG, "Cannot use ref_tile, too few mbs\n");
ref_tile++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment