summaryrefslogtreecommitdiff
path: root/libpostproc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-18 21:10:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-18 21:10:18 +0200
commit859d7d4640c3cccde4803a4fe6878efd50e57bc0 (patch)
tree33b6f8ffdc9b410443f39916d58db165747f73bf /libpostproc
parentd9b141c05f32583256b14667757b8c921417701b (diff)
downloadffmpeg-859d7d4640c3cccde4803a4fe6878efd50e57bc0.tar.gz
postproc/postprocess: Use FF_ARRAY_ELEMS() in pp_free_context() instead of hard-coding their size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libpostproc')
-rw-r--r--libpostproc/postprocess.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 081b430939..214a654a04 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -926,8 +926,10 @@ void pp_free_context(void *vc){
PPContext *c = (PPContext*)vc;
int i;
- for(i=0; i<3; i++) av_free(c->tempBlurred[i]);
- for(i=0; i<3; i++) av_free(c->tempBlurredPast[i]);
+ for(i=0; i<FF_ARRAY_ELEMS(c->tempBlurred); i++)
+ av_free(c->tempBlurred[i]);
+ for(i=0; i<FF_ARRAY_ELEMS(c->tempBlurredPast); i++)
+ av_free(c->tempBlurredPast[i]);
av_free(c->tempBlocks);
av_free(c->yHistogram);