[FFmpeg-devel] [PATCH 2/5] lavc/qsvdec: Replace current parser with MFXVideoDECODE_DecodeHeader()

Hendrik Leppkes h.leppkes at gmail.com
Fri Jan 25 13:09:51 EET 2019

On Fri, Jan 25, 2019 at 11:43 AM Li, Zhong <zhong.li at intel.com> wrote:
> avctx->pix_fmt should be get from MFXVideoDECODE_DecodeHeader() but it is needed to init MSDK session, and looks like a deadlock, :(
> One solution is that we assume avctx->format has been parsed somewhere else (such as avformat_find_stream_info() form libavformt) before start decoding.

You cannot rely on that. Especially since noone knows what format the
decoder is going to use. avformat will tell you its YUV420P10, not
A user who doesn't use avformat at all and only feed avcodec will
likely not set avctx->format at all, since basically nothing else
needs it.

A decoder has to figure out the pixel format by itself.

- Hendrik

More information about the ffmpeg-devel mailing list