diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2023-01-09 15:12:08 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2023-01-17 10:10:52 +0800 |
commit | 6ce23ebaac4f36d0477da18991ef16188e52a2ad (patch) | |
tree | 10c4b919b1ce9982ff889e347c225c1b6c8c36e3 | |
parent | dc5369144b824ee6d14086b06759b291a8213646 (diff) | |
download | ffmpeg-6ce23ebaac4f36d0477da18991ef16188e52a2ad.tar.gz |
lavfi/vf_vpp_qsv: check output format string against NULL pointer
This is in preparation for reusing the code for other QSV filters. E.g.
deinterlacing_qsv may have an option array without format option
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
-rw-r--r-- | libavfilter/vf_vpp_qsv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index b04307b644..4aad856a2e 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -279,7 +279,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); |