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

Li, Zhong zhong.li at intel.com
Tue Jul 10 11:43:49 EEST 2018


> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Moritz Barsnick
> Sent: Thursday, July 5, 2018 9:20 PM
> To: FFmpeg development discussions and patches
> <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_qsv: fix log level for
> session initialization error
> 
> On Thu, Jul 05, 2018 at 10:17:35 +0000, Li, Zhong wrote:
> > > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On
> > > Behalf Of Moritz Barsnick
> [...]
> > > 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?
> 
> Basically yes, even in other places, but that function's in libavcodec, and
> we're in libavutil. We would need to move the code around IIUC,but I don't

Yes, it is a general problem in libavfilter an libavutil. Currently for mostly all cases "status != MFX_ERR_NONE", AVERROR_UNKNOWN is returned. 
This is confusing just like you mentioned mfx status haven't been printed. And also MFX_WRN_XX is not fatal, giving a warning message should be enough.
So making ff_qsv_print_error() can be called by libavfilter/libavutils should be a good idea.

> have any way of testing new code with this failing scenario right now (I have
> this effect on a Windows machine, but can't actually build on Windows), so
> that would be a blind modification from my side.
> Better if the QSV maintainers (i.e. you ;-)) did this.
> 
> This is the issue it would help to understand:
> http://ffmpeg.org/pipermail/ffmpeg-user/2018-July/040438.html
> 
> Thanks,
> Moritz



More information about the ffmpeg-devel mailing list