[FFmpeg-cvslog] postproc/postprocess: Use FF_ARRAY_ELEMS() in pp_free_context() instead of hard-coding their size

Michael Niedermayer git at videolan.org
Fri Sep 19 00:02:01 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep 18 21:10:18 2014 +0200| [859d7d4640c3cccde4803a4fe6878efd50e57bc0] | committer: Michael Niedermayer

postproc/postprocess: Use FF_ARRAY_ELEMS() in pp_free_context() instead of hard-coding their size

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=859d7d4640c3cccde4803a4fe6878efd50e57bc0
---

 libpostproc/postprocess.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 081b430..214a654 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);



More information about the ffmpeg-cvslog mailing list