summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/ivi_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index b3b6e9f13b..6cb4ea274a 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -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) {
- tile->ref_mbs = ref_tile->mbs;
+ 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++;
}