[FFmpeg-devel] [PATCH v2 17/22] lavfi/vpp_qsv: check output format string against NULL pointer

Haihao Xiang haihao.xiang at intel.com
Mon May 17 06:24:21 EEST 2021


This is in preparation for re-using VPPContext but with a different
option array for deinterlacing_qsv filter
---
 libavfilter/vf_vpp_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index 018b0e8689..90b0b25210 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -235,7 +235,7 @@ static av_cold int vpp_init(AVFilterContext *ctx)
 {
     VPPContext  *vpp  = ctx->priv;
 
-    if (!strcmp(vpp->output_format_str, "same")) {
+    if (!vpp->output_format_str || !strcmp(vpp->output_format_str, "same")) {
         vpp->out_format = AV_PIX_FMT_NONE;
     } else {
         vpp->out_format = av_get_pix_fmt(vpp->output_format_str);
-- 
2.25.1



More information about the ffmpeg-devel mailing list