Permalink
Browse files

sab_diamond_search: add assert to double check the minima_count

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
1 parent 617d0d4 commit bbd7b46b94ee8e8d668f950c65ec470fa43ede79 @michaelni michaelni committed Nov 4, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 libavcodec/motion_est_template.c
@@ -688,6 +688,8 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
LOAD_COMMON2
unsigned map_generation = c->map_generation;
+ av_assert1(minima_count <= MAX_SAB_SIZE);
+
cmpf= s->dsp.me_cmp[size];
chroma_cmpf= s->dsp.me_cmp[size+1];

0 comments on commit bbd7b46

Please sign in to comment.