[FFmpeg-devel] [PATCH] avutil/hwcontext_qsv: fix log level for session initialization error

Li, Zhong zhong.li at intel.com
Thu Jul 5 13:17:35 EEST 2018


> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Moritz Barsnick
> Sent: Wednesday, July 4, 2018 10:25 PM
> To: FFmpeg development discussions and patches
> <ffmpeg-devel at ffmpeg.org>
> Subject: [FFmpeg-devel] [PATCH] avutil/hwcontext_qsv: fix log level for
> session initialization error
> 
> While the error is not fatal, the message should not be displayed only in
> verbose logging, as its consequences are of interest.
> 
> Also fix message formatting (missing space).
> 
> Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
> ---
> 
> Ideally, the returned mfxStatus would be evaluated and printed, but no such
> function is available (yet). %d perhaps?

ff_qsv_print_error() can be used to print detailed error type. Is it helpful?

> 
>  libavutil/hwcontext_qsv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index
> 250091c4e8..e7ffb42f37 100644
> --- a/libavutil/hwcontext_qsv.c
> +++ b/libavutil/hwcontext_qsv.c
> @@ -474,7 +474,7 @@ static int
> qsv_init_internal_session(AVHWFramesContext *ctx,
> 
>      err = MFXVideoVPP_Init(*session, &par);
>      if (err != MFX_ERR_NONE) {
> -        av_log(ctx, AV_LOG_VERBOSE, "Error opening the internal VPP
> session."
> +        av_log(ctx, AV_LOG_WARNING, "Error opening the internal VPP
> session. "
>                 "Surface upload/download will not be possible\n");
>          MFXClose(*session);
>          *session = NULL;
> --
> 2.14.4



More information about the ffmpeg-devel mailing list