On Tue, Jan 23, 2018 at 6:05 AM, Li, Zhong <zhong...@intel.com> wrote:
>>
>> I believe a problem with this method is that you don't have any libmfx
>> session at the point where you do the initial parsing (since you only get it
>> after the get_format() callback, which needs information from that parsing).
>> How would you intend to get the session to use for this purpose?
>
> avformat_find_stream_info() can provides some information and sw_pix_fmt can 
> be set as NV12.
> These parameters can be updated after MFXVideoDECODE_DecodeHeader is called.
>

Its best if decoders rely as little as possible on information passed
to them externally like this. If you have extradata, you should decode
that to determine the stream properties, and not rely on information
set anywhere else.
You should always keep in mind that a user application could use
libavcodec stand-alone without libavformat, so the amount of stream
information they provide might be different. Right now the only thing
you need to pass to make H264/HEVC decoding work, for example, is the
extradata.

- Hendrik
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to