Commit 96dfa14f authored by michael's avatar michael

Check dia size a little more. Fixes CID80.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13481 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d492df2b
......@@ -235,6 +235,12 @@ void ff_init_me(MpegEncContext *s){
MotionEstContext * const c= &s->me;
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){
av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n");
return -1;
}
c->avctx= s->avctx;
if(cache_size < 2*dia_size && !c->stride){
......
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