aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/motion_est_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-04 04:46:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-04 13:00:20 +0100
commitbbd7b46b94ee8e8d668f950c65ec470fa43ede79 (patch)
tree0095f7ffed4971eb0dcc68bf4c12802cd56f1b46 /libavcodec/motion_est_template.c
parent617d0d41a2cf81ad68fb8bc94332756272149eca (diff)
downloadffmpeg-bbd7b46b94ee8e8d668f950c65ec470fa43ede79.tar.gz
sab_diamond_search: add assert to double check the minima_count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r--libavcodec/motion_est_template.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 07bfc00bf7..2b1c6e166d 100644
--- a/libavcodec/motion_est_template.c
+++ b/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];