[FFmpeg-cvslog] avfilter/vf_vif.c: fix build warning for [-Wmain]

Guo, Yejun git at videolan.org
Thu Feb 25 12:44:29 EET 2021


ffmpeg | branch: master | Guo, Yejun <yejun.guo at intel.com> | Thu Feb 25 14:38:12 2021 +0800| [ae4f6379d6b52e480e4ad335e0a71292effdf839] | committer: Paul B Mahol

avfilter/vf_vif.c: fix build warning for [-Wmain]

src/libavfilter/vf_vif.c: In function ‘process_frame’:
src/libavfilter/vf_vif.c:542:20: warning: ‘main’ is usually a function [-Wmain]
     AVFrame *out, *main = NULL, *ref = NULL;
                    ^~~~

Signed-off-by: Guo, Yejun <yejun.guo at intel.com>

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

 libavfilter/vf_vif.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c
index 876c7c9120..0bd71eca5c 100644
--- a/libavfilter/vf_vif.c
+++ b/libavfilter/vf_vif.c
@@ -539,22 +539,22 @@ static int process_frame(FFFrameSync *fs)
     AVFilterContext *ctx = fs->parent;
     VIFContext *s = fs->opaque;
     AVFilterLink *outlink = ctx->outputs[0];
-    AVFrame *out, *main = NULL, *ref = NULL;
+    AVFrame *out_frame, *main_frame = NULL, *ref_frame = NULL;
     int ret;
 
-    ret = ff_framesync_dualinput_get(fs, &main, &ref);
+    ret = ff_framesync_dualinput_get(fs, &main_frame, &ref_frame);
     if (ret < 0)
         return ret;
 
-    if (ctx->is_disabled || !ref) {
-        out = main;
+    if (ctx->is_disabled || !ref_frame) {
+        out_frame = main_frame;
     } else {
-        out = do_vif(ctx, main, ref);
+        out_frame = do_vif(ctx, main_frame, ref_frame);
     }
 
-    out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
+    out_frame->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
 
-    return ff_filter_frame(outlink, out);
+    return ff_filter_frame(outlink, out_frame);
 }
 
 



More information about the ffmpeg-cvslog mailing list