[FFmpeg-cvslog] lavfi: add braces around the block of an if() expression in avfilter_default_get_video_buffer

Stefano Sabatini git at videolan.org
Thu Jun 2 18:55:16 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Thu Jun  2 16:33:25 2011 +0200| [6f1dd6f45a641ca7670c7b00fbeea42420b89ada] | committer: Stefano Sabatini

lavfi: add braces around the block of an if() expression in avfilter_default_get_video_buffer

Clarify code layout.

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

 libavfilter/defaults.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c
index 4a01b10..c83d500 100644
--- a/libavfilter/defaults.c
+++ b/libavfilter/defaults.c
@@ -42,7 +42,8 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per
     AVFilterBufferRef *picref = NULL;
     AVFilterPool *pool = link->pool;
 
-    if (pool) for (i = 0; i < POOL_SIZE; i++) {
+    if (pool) {
+        for (i = 0; i < POOL_SIZE; i++) {
         picref = pool->pic[i];
         if (picref && picref->buf->format == link->format && picref->buf->w == w && picref->buf->h == h) {
             AVFilterBuffer *pic = picref->buf;
@@ -57,6 +58,7 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per
             memcpy(picref->linesize, pic->linesize, sizeof(picref->linesize));
             return picref;
         }
+        }
     } else
         pool = link->pool = av_mallocz(sizeof(AVFilterPool));
 



More information about the ffmpeg-cvslog mailing list