I got it from the codec_ctx:
codec_ctx->pix_fmt represents the actual pixel format

________________________________________
发件人: Libav-user <[email protected]> 代表 Peter Krefting 
<[email protected]>
发送时间: 2022年4月10日 5:42
收件人: This list is about using libavcodec, libavformat, libavutil, libavdevice 
and libavfilter.
主题: Re: [Libav-user] How can I get the pix_fmt info from AVFrame objects?

2022-04-09 15:01 skrev B Aleck:

> Assuming that the operation succeeds, I found frame->format is always
> zero
> What's the format field used for? Only for outputs?
> And how can I get pix_fmt of the frame?

The format field should be the pixel format if the frame was decoded
successfully, you should be able to get the textual representation by
calling av_get_pix_fmt_name((AVPixelFormat) frame->format);

--
\\// Peter - http://www.softwolves.pp.se/
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to