[FFmpeg-devel] [PATCH V4 2/2] lavfi/nlmeans: fix mixed declarations and code

Jun Zhao mypopydev at gmail.com
Fri Mar 8 10:14:12 EET 2019


From: Jun Zhao <barryjzhao at tencent.com>

fix mixed declarations and code in C90 after last change

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
---
 libavfilter/vf_nlmeans.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c
index 8d47f9d..7497df2 100644
--- a/libavfilter/vf_nlmeans.c
+++ b/libavfilter/vf_nlmeans.c
@@ -476,6 +476,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     AVFilterContext *ctx = inlink->dst;
     NLMeansContext *s = ctx->priv;
     AVFilterLink *outlink = ctx->outputs[0];
+    AVFrame *out;
 
     // accumulation of 8-bits uint_8 into 32-bits data type, it will have
     // a risk of an integral value becoming larger than the 32-bits integer
@@ -488,7 +489,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
         return AVERROR(EINVAL);
     }
 
-    AVFrame *out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
+    out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
     if (!out) {
         av_frame_free(&in);
         return AVERROR(ENOMEM);
-- 
1.7.1



More information about the ffmpeg-devel mailing list