[FFmpeg-devel] [PATCH] avfilter/vf_overlay_qsv: initialize default pix_fmt
Li, Zhong
zhong.li at intel.com
Mon Nov 5 14:24:51 EET 2018
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Linjie Fu
> Sent: Monday, November 5, 2018 5:37 PM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Fu, Linjie <linjie.fu at intel.com>
> Subject: [FFmpeg-devel] [PATCH] avfilter/vf_overlay_qsv: initialize default
> pix_fmt
>
> add default initiaization for pix_fmt in function have_alpha_panar to avoid
> using uninitialized value.
>
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
> libavfilter/vf_overlay_qsv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index
> 20871786ee..79d6a58ec3 100644
> --- a/libavfilter/vf_overlay_qsv.c
> +++ b/libavfilter/vf_overlay_qsv.c
> @@ -167,7 +167,8 @@ static int have_alpha_planar(AVFilterLink *link)
> if (link->format == AV_PIX_FMT_QSV) {
> fctx = (AVHWFramesContext *)link->hw_frames_ctx->data;
> pix_fmt = fctx->sw_format;
> - }
> + } else
> + pix_fmt = AV_PIX_FMT_NONE;
>
> desc = av_pix_fmt_desc_get(pix_fmt);
> if (!desc)
> --
> 2.17.1
I believe https://patchwork.ffmpeg.org/patch/9069/ should be better (If nobody against, I prefer to merge it).
More information about the ffmpeg-devel
mailing list