From e05e5920a4e1f1f15cc8a7c843159d519f6ec18e Mon Sep 17 00:00:00 2001 From: Zhong Li Date: Wed, 15 Aug 2018 17:39:33 +0800 Subject: qsv: Error out if getting session handle failed in avfilter Solve some issues found by an automated code scansion. Suppress the complain "variables 'handle' is used but maybe uninitialized". Signed-off-by: Zhong Li Signed-off-by: Luca Barbato --- libavfilter/vf_deinterlace_qsv.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavfilter/vf_deinterlace_qsv.c') diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c index bb26a4dbfe..b659d424be 100644 --- a/libavfilter/vf_deinterlace_qsv.c +++ b/libavfilter/vf_deinterlace_qsv.c @@ -201,6 +201,11 @@ static int init_out_session(AVFilterContext *ctx) } } + if (err != MFX_ERR_NONE) { + av_log(ctx, AV_LOG_ERROR, "Error getting the session handle\n"); + return AVERROR_UNKNOWN; + } + /* create a "slave" session with those same properties, to be used for * actual deinterlacing */ err = MFXInit(impl, &ver, &s->session); -- cgit v1.2.3