Browse Source

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 <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n4.1
Zhong Li Luca Barbato 7 years ago
parent
commit
e05e5920a4
3 changed files with 15 additions and 0 deletions
  1. +5
    -0
      libavfilter/qsvvpp.c
  2. +5
    -0
      libavfilter/vf_deinterlace_qsv.c
  3. +5
    -0
      libavfilter/vf_scale_qsv.c

+ 5
- 0
libavfilter/qsvvpp.c View File

@@ -503,6 +503,11 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
}
}

if (ret != MFX_ERR_NONE) {
av_log(avctx, AV_LOG_ERROR, "Error getting the session handle\n");
return AVERROR_UNKNOWN;
}

/* create a "slave" session with those same properties, to be used for vpp */
ret = MFXInit(impl, &ver, &s->session);
if (ret != MFX_ERR_NONE) {


+ 5
- 0
libavfilter/vf_deinterlace_qsv.c View File

@@ -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);


+ 5
- 0
libavfilter/vf_scale_qsv.c View File

@@ -300,6 +300,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 scaling */
err = MFXInit(impl, &ver, &s->session);


Loading…
Cancel
Save