]> git.sesse.net Git - ffmpeg/commitdiff
postproc/postprocess: Use FF_ARRAY_ELEMS() in pp_free_context() instead of hard-codin...
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Sep 2014 19:10:18 +0000 (21:10 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Sep 2014 19:10:18 +0000 (21:10 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libpostproc/postprocess.c

index 081b430939dc973223390a7e9367be50b9775d64..214a654a04b6305e5a3035b174c9722a0562ceb3 100644 (file)
@@ -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);