IMHO, if link format is QSV, should pass from sw_format, else should pass from link->format direct. Initializing it to be AV_PIX_FMT_NONE is approximate to un-initialization for non QSV format case.
> -----Original Message----- > From: libav-devel [mailto:[email protected]] On Behalf Of > Maxym Dmytrychenko > Sent: Tuesday, July 3, 2018 4:18 PM > To: libav development <[email protected]> > Subject: Re: [libav-devel] [PATCH] lavc/qsv_overlay: suppress code scan > complain > > should it be AV_PIX_FMT_NONE ? > > On Tue, Jul 3, 2018 at 9:53 AM Zhong Li <[email protected]> wrote: > > > Suppress the complain "variables 'pix_fmt' is used but maybe > > uninitialized". > > > > Signed-off-by: Zhong Li <[email protected]> > > --- > > libavfilter/vf_overlay_qsv.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavfilter/vf_overlay_qsv.c > > b/libavfilter/vf_overlay_qsv.c index 89f2fb1..33d50a5 100644 > > --- a/libavfilter/vf_overlay_qsv.c > > +++ b/libavfilter/vf_overlay_qsv.c > > @@ -162,7 +162,7 @@ release: > > > > static int have_alpha_planar(AVFilterLink *link) { > > - enum AVPixelFormat pix_fmt; > > + enum AVPixelFormat pix_fmt = link->format; > > const AVPixFmtDescriptor *desc; > > AVHWFramesContext *fctx; > > > > -- > > 2.7.4 > > > > _______________________________________________ > > libav-devel mailing list > > [email protected] > > https://lists.libav.org/mailman/listinfo/libav-devel > _______________________________________________ > libav-devel mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
