diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 19:33:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 19:33:39 +0200 |
commit | 3a48e38ad0e37d89065843548414d367e70593bf (patch) | |
tree | 6aba42924757f353bf2a51be576953c5ebba6fbf | |
parent | 6f557a2e125b1236a96d325d5eb96f8614c5858b (diff) | |
download | ffmpeg-3a48e38ad0e37d89065843548414d367e70593bf.tar.gz |
motion_est: more complete SAB diamond size check
This makes no difference with the current #defines
Fixes CID732255
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/motion_est.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 013df37971..4d08a14d5b 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -298,7 +298,7 @@ int ff_init_me(MpegEncContext *s){ int cache_size= FFMIN(ME_MAP_SIZE>>ME_MAP_SHIFT, 1<<ME_MAP_SHIFT); int dia_size= FFMAX(FFABS(s->avctx->dia_size)&255, FFABS(s->avctx->pre_dia_size)&255); - if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -ME_MAP_SIZE){ + if(FFMIN(s->avctx->dia_size, s->avctx->pre_dia_size) < -FFMIN(ME_MAP_SIZE, MAX_SAB_SIZE)){ av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n"); return -1; } |