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

Submitted by Jun Zhao on March 8, 2019, 8:14 a.m.

Details

Message ID 1552032852-18731-2-git-send-email-mypopydev@gmail.com
State New
Headers show

Commit Message

Jun Zhao March 8, 2019, 8:14 a.m.
From: Jun Zhao <barryjzhao@tencent.com>

fix mixed declarations and code in C90 after last change

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

Patch hide | download patch | download mbox

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);