[libav-api] H264 Decoding

Luca Barbato lu_zero at gentoo.org
Tue Jun 7 19:54:53 CEST 2016


On 03/06/16 16:07, Kiara Forman wrote:
> A similar thing happens when i say the image is nv12. I even tried
> nv21. Is there a way to tell the image format from the AVFrame data?
> 
> 
> Also, AVCodecContext.pix_fmt = AV_PIX_FMT_YUV420P thats going into
> avcodec_decode_video2. Is there some reason why the AVFrame data that
> coming out is not the same pix_fmt?
> 

The AVFrame.format field is what determines what is the content of the
frame.

the information in the codec context should not be trusted.

https://blogs.gentoo.org/lu_zero/2015/11/08/trusting-the-context/

lu



More information about the libav-api mailing list